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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: #1a2a3a;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 3px solid #d4af37;
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #1a2a3a 0%, #2a3a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.logo p {
    color: #666;
    font-size: 0.9rem;
}

.header-links {
    display: flex;
    gap: 1rem;
}

.header-links a {
    color: #1a2a3a;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.header-links a:hover {
    background: #d4af37;
    color: #1a2a3a;
}

/* Tool Container */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Controls Panel */
.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: fit-content;
}

.controls h2 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #1a2a3a;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.control-group input,
.control-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.control-group input:focus,
.control-group textarea:focus {
    outline: none;
    border-color: #d4af37;
}

.control-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.control-group input[type="file"] {
    padding: 0.5rem;
}

.template-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.template-btn {
    padding: 0.6rem 1.2rem;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.template-btn:hover {
    background: #e0e0e0;
}

.template-btn.active {
    background: #d4af37;
    color: #1a2a3a;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn-primary {
    background: #1a2a3a;
    color: white;
}

.btn-primary:hover {
    background: #2a3a4a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.info-note {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
}

/* Flyer Preview */
.preview {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #1a2a3a;
}

.flyer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.flyer-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 100%;
}

.flyer h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.flyer p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.flyer-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.flyer-footer p {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

/* Template Variations */
.flyer.business-template {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.flyer.event-template {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.flyer.promo-template {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.flyer.community-template {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.preview-note {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #888;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
    color: #666;
}

footer a {
    color: #1a2a3a;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    color: #d4af37;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .flyer h1 {
        font-size: 1.5rem;
    }
    
    .flyer p {
        font-size: 0.9rem;
    }
    
    .flyer {
        padding: 1rem;
        min-height: 300px;
    }
    
    .controls {
        order: 2;
    }
    
    .preview {
        order: 1;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .template-buttons {
        gap: 0.5rem;
    }
    
    .template-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}