* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e1e5e9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #64b5f6;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #e1e5e9;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

/* Main Content */
.main {
    margin-top: 80px;
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature i {
    font-size: 1.2rem;
}

/* Categories Section */
.categories {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 20px;
    margin: 2rem 20px;
    padding: 3rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #e1e5e9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: #e1e5e9;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(100, 181, 246, 0.3);
    border-color: #64b5f6;
    background: rgba(255, 255, 255, 0.08);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

.category-icon i {
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.category-card p {
    text-align: center;
    opacity: 0.8;
    line-height: 1.6;
}

/* Generator Styles */
.generator-container {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 20px;
    margin: 2rem 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e1e5e9;
}

.form-select,
.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #e1e5e9;
    backdrop-filter: blur(10px);
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #64b5f6;
}

.checkbox-group label {
    color: #e1e5e9;
}

.btn {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(100, 181, 246, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    margin-left: 1rem;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.5);
}

.result-container {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid #64b5f6;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.result-title {
    margin-bottom: 1rem;
    color: #e1e5e9;
}

.result-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    color: #e1e5e9;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .category-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .generator-container {
        margin: 1rem 10px;
        padding: 2rem;
    }
}

/* Дополнительные стили для улучшения UX */
.btn:active {
    transform: translateY(0);
}

.form-select:hover,
.form-input:hover,
.form-textarea:hover {
    border-color: #64b5f6;
}

.category-card:active {
    transform: translateY(-5px);
}

/* Анимации загрузки */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Улучшенные стили для результата */
.result-container {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для скролла */
.result-text::-webkit-scrollbar {
    width: 8px;
}

.result-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.result-text::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.result-text::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Улучшения для форм */
.checkbox-group:hover label {
    color: #64b5f6;
}

.form-group {
    position: relative;
}

.form-label {
    position: relative;
    z-index: 1;
}

/* Градиентные границы для карточек */
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 15px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 768px) {
    .hero-features {
        gap: 1rem;
    }
    
    .feature {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .generator-container {
        margin: 1rem 10px;
        padding: 2rem 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    .color-scheme-preview {
        grid-template-columns: 1fr;
    }
    
    .scheme-preview {
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.5rem;
    }
    
    .nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Стили для предпросмотра цветовых схем */
.style-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.style-card {
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.style-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.style-card.selected { border-color: #64b5f6; box-shadow: 0 0 0 3px rgba(100,181,246,0.25); }

.style-hero { font-weight: 800; letter-spacing: 0.3px; margin-bottom: 0.35rem; }
.style-text { opacity: .9; font-size: .9rem; margin-bottom: .6rem; }
.style-button { display: inline-block; padding: .45rem .8rem; border-radius: 8px; font-size: .85rem; border: 1px solid rgba(255,255,255,0.25); }

/* Минимализм */
.style-minimalism { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)); border-style: dashed; border-color: rgba(255,255,255,0.15); }
.style-minimalism .style-hero { font-weight: 700; }
.style-minimalism .style-button { background: rgba(255,255,255,0.12); }

/* Glassmorphism */
.style-glass { background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); backdrop-filter: blur(12px); }
.style-glass .style-button { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); }

/* Neumorphism */
.style-neumorphism { background: #1a1f2d; box-shadow: 8px 8px 18px rgba(0,0,0,0.45), -8px -8px 18px rgba(255,255,255,0.03) inset; }
.style-neumorphism .style-button { background: #1e2433; box-shadow: inset 3px 3px 6px rgba(0,0,0,0.5), inset -3px -3px 6px rgba(255,255,255,0.04); }

/* Brutalism */
.style-brutalism { background: #202733; border: 3px solid #e9c46a; border-radius: 6px; }
.style-brutalism .style-hero { text-transform: uppercase; }
.style-brutalism .style-button { background: #e9c46a; color: #1a1a1a; border-color: #e9c46a; }

/* Material */
.style-material { background: linear-gradient(180deg, #1f2a44, #1b243a); box-shadow: 0 6px 12px rgba(0,0,0,.4); }
.style-material .style-button { background: #42a5f5; border-color: #42a5f5; box-shadow: 0 8px 18px rgba(66,165,245,.35); }

/* Retro */
.style-retro { background: linear-gradient(135deg, #2a1f1a, #37251e); }
.style-retro .style-hero { color: #ffd8a8; }
.style-retro .style-text { color: #ffe8cc; }
.style-retro .style-button { background: #ffb703; color: #2a1f1a; border-color: #ffb703; }

/* Cyberpunk */
.style-cyberpunk { background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(255,0,128,0.12)); border-color: rgba(0,212,255,0.35); }
.style-cyberpunk .style-button { background: rgba(0,212,255,0.25); border-color: rgba(0,212,255,0.55); }
.color-scheme-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.color-scheme-card {
    --radius: 14px;
    --glow: 0 10px 30px rgba(0,0,0,0.35);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, filter 0.35s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glow);
}

.color-scheme-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 60% at 100% -10%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 60%),
                radial-gradient(120% 60% at -10% 110%, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
}

.color-scheme-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    filter: saturate(1.05);
}

.color-scheme-card.selected {
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.3);
}

.scheme-preview {
    padding: 1rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-header {
    font-weight: bold;
    font-size: 1rem;
}

.preview-text {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.3;
}

.preview-button {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    text-align: center;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.scheme-info {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.8rem 1rem;
    text-align: center;
}

.color-scheme-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.scheme-description {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Цветовые схемы */
.scheme-ocean {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.scheme-ocean { --radius: 18px; }
.scheme-ocean .scheme-preview { 
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0));
}

.scheme-ocean .preview-button {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.scheme-sunset {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
}
.scheme-sunset { --radius: 16px; }
.scheme-sunset .scheme-preview {
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
}

.scheme-sunset .preview-button {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.scheme-forest {
    background: linear-gradient(135deg, #2d5016, #3e6b1f);
    color: white;
}
.scheme-forest { --radius: 20px; }
.scheme-forest .scheme-preview {
    background: linear-gradient(180deg, rgba(163, 217, 119, 0.15), rgba(163, 217, 119, 0));
}

.scheme-forest .preview-button {
    background: rgba(163, 217, 119, 0.3);
    border-color: rgba(163, 217, 119, 0.5);
}

.scheme-neon {
    background: linear-gradient(135deg, #ff006e, #8338ec);
    color: white;
}
.scheme-neon { --radius: 14px; }
.scheme-neon .scheme-preview {
    background: linear-gradient(180deg, rgba(0,212,255,0.18), rgba(0,212,255,0));
}

.scheme-neon .preview-button {
    background: rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

.scheme-minimal {
    background: linear-gradient(135deg, #212529, #495057);
    color: white;
}
.scheme-minimal { --radius: 12px; }
.scheme-minimal .scheme-preview {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}

.scheme-minimal .preview-button {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.scheme-purple {
    background: linear-gradient(135deg, #6f42c1, #9c27b0);
    color: white;
}
.scheme-purple { --radius: 22px; }
.scheme-purple .scheme-preview {
    background: linear-gradient(180deg, rgba(225,190,231,0.12), rgba(225,190,231,0));
}

.scheme-purple .preview-button {
    background: rgba(225, 190, 231, 0.3);
    border-color: rgba(225, 190, 231, 0.5);
}

.scheme-emerald {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}
.scheme-emerald { --radius: 18px; }
.scheme-emerald .scheme-preview {
    background: linear-gradient(180deg, rgba(167,243,208,0.15), rgba(167,243,208,0));
}

.scheme-emerald .preview-button {
    background: rgba(167, 243, 208, 0.3);
    border-color: rgba(167, 243, 208, 0.5);
}

.scheme-fire {
    background: linear-gradient(135deg, #dc2626, #ea580c);
    color: white;
}
.scheme-fire { --radius: 16px; }
.scheme-fire .scheme-preview {
    background: linear-gradient(180deg, rgba(254,215,215,0.16), rgba(254,215,215,0));
}

.scheme-fire .preview-button {
    background: rgba(254, 215, 215, 0.3);
    border-color: rgba(254, 215, 215, 0.5);
}

.scheme-cyberpunk {
    background: linear-gradient(135deg, #00d4ff, #ff0080);
    color: white;
}
.scheme-cyberpunk { --radius: 18px; }
.scheme-cyberpunk .scheme-preview {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.35), rgba(26, 26, 46, 0));
}

.scheme-cyberpunk .preview-button {
    background: rgba(26, 26, 46, 0.4);
    border-color: rgba(26, 26, 46, 0.6);
}

.scheme-nature {
    background: linear-gradient(135deg, #84cc16, #22c55e);
    color: white;
}
.scheme-nature { --radius: 24px; }
.scheme-nature .scheme-preview {
    background: linear-gradient(180deg, rgba(220,252,231,0.15), rgba(220,252,231,0));
}

.scheme-nature .preview-button {
    background: rgba(220, 252, 231, 0.3);
    border-color: rgba(220, 252, 231, 0.5);
}
