* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    min-height: 100vh;
    color: #333;
}

header {
    text-align: center;
    padding: 3rem 1rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.logo-builder {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.canvas-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#logoCanvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.controls-panel {
    overflow-y: auto;
    max-height: 600px;
}

.control-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.control-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.control-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.control-group input[type="text"],
.control-group select {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.control-group input[type="range"] {
    flex: 1;
}

.control-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.icon-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.icon-btn {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover,
.icon-btn.active {
    border-color: #f5576c;
    background: #fef4f5;
}

.preset-colors {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.preset-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    border-color: #f5576c;
    color: #f5576c;
}

.layout-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.layout-btn {
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.layout-btn:hover,
.layout-btn.active {
    border-color: #f5576c;
    background: #fef4f5;
}

.export-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.export-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.export-buttons button {
    padding: 0.8rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.export-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.size-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.size-options select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.templates-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.templates-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.template-card:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.template-preview {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.template-preview svg {
    width: 100%;
    height: 80px;
}

.template-card p {
    font-weight: 600;
    color: #666;
}

footer {
    background: rgba(255,255,255,0.95);
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.ad-area {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-area p {
    color: #999;
}

.copy-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-notification.show {
    opacity: 1;
}

@media (max-width: 1024px) {
    .logo-builder {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group label {
        min-width: auto;
    }
    
    .layout-options {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
}