:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --paper-texture: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><defs><filter id="paper"><feTurbulence baseFrequency="0.04" numOctaves="5" result="noise" seed="1"/><feDiffuseLighting in="noise" lighting-color="white" surfaceScale="1"><feDistantLight azimuth="45" elevation="60"/></feDiffuseLighting></filter></defs><rect width="100%" height="100%" fill="%23ecf0f1" filter="url(%23paper)"/></svg>');
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-color);
    background-image: var(--paper-texture);
    color: var(--primary-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.main-content {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.quick-start {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.quick-start h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.logo-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--success-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--light-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.editor-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.editor-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.canvas-container {
    display: flex;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
}

#logoCanvas {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    max-width: 100%;
    height: auto;
}

.editor-tools {
    display: grid;
    gap: 1rem;
}

.tool-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
}

.tool-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tool-section input[type="text"],
.tool-section input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.color-swatch:hover,
.color-swatch.active {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.shape-tools {
    display: flex;
    gap: 0.5rem;
}

.shape-btn {
    padding: 0.75rem;
    background: var(--light-color);
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.shape-btn:hover,
.shape-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.projects-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}

.project-card.selected {
    border-color: var(--success-color);
    background: #f0fff4;
}

.project-preview {
    width: 100%;
    height: 120px;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary-color);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.project-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.faq-list {
    display: grid;
    gap: 1rem;
}

.faq-item {
    border: 2px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: #f8f9fa;
    border: none;
    padding: 1rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question[aria-expanded="true"] {
    background: var(--secondary-color);
    color: white;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: 1rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #7f8c8d;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 60px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    margin-top: 2rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 600;
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
    
    .editor-workspace {
        grid-template-columns: 2fr 1fr;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .bottom-nav {
        position: relative;
        background: transparent;
        border: none;
        box-shadow: none;
        justify-content: center;
        gap: 2rem;
        padding: 2rem 0;
    }
    
    .nav-item {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem 2rem;
        border: 2px solid #ddd;
        border-radius: 50px;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        min-width: auto;
    }
    
    .nav-item i {
        margin-bottom: 0;
    }
    
    .nav-item span {
        font-size: 1rem;
    }
    
    body {
        padding-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .color-palette {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .tool-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
        align-items: start;
    }
    
    .tool-section h3 {
        grid-column: 1 / -1;
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
