/* ========== ОСНОВНЫЕ ПЕРЕМЕННЫЕ И СБРОС - АУДИО ТЕМА ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(255,240,235,0.95) 0%, rgba(255,245,250,1) 90%);
    --glass-bg: rgba(255,245,240,0.5);
    --glass-border: rgba(255,160,120,0.4);
    --glass-shadow: 0 20px 40px -12px rgba(80,30,0,0.2);
    --card-bg: rgba(255,235,225,0.45);
    --text-primary: #3a1f0d;
    --text-secondary: #6b3a1f;
    --accent: #ff6b3b;
    --accent-soft: #ff8c5a;
    --accent-gradient: linear-gradient(135deg, #ff6b3b, #ff9f4a);
    --border-light: rgba(255,180,140,0.5);
    --faq-bg: rgba(255,235,225,0.3);
    --shadow-color: rgba(80,40,10,0.1);
    --particle-color: rgba(255,107,59,0.2);
}

body.dark {
    --bg-gradient: radial-gradient(circle at 30% 30%, #1a0f08, #0d0805);
    --glass-bg: rgba(40,25,18,0.6);
    --glass-border: rgba(255,107,59,0.25);
    --glass-shadow: 0 20px 40px -8px rgba(0,0,0,0.6);
    --card-bg: rgba(50,30,20,0.5);
    --text-primary: #f5d5b5;
    --text-secondary: #d4a574;
    --accent: #ff7645;
    --accent-soft: #ff9a6e;
    --accent-gradient: linear-gradient(135deg, #ff7645, #ffaa6e);
    --border-light: rgba(255,107,59,0.2);
    --faq-bg: rgba(50,30,20,0.5);
    --shadow-color: rgba(0,0,0,0.5);
    --particle-color: rgba(255,107,59,0.25);
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background .3s, color .2s;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23ff6b3b"><circle cx="12" cy="12" r="10" fill="%23ff6b3b" opacity="0.5"/><circle cx="12" cy="12" r="4" fill="white"/></svg>') 12 12, auto;
}

/* ========== ФОНОВЫЕ ШАРЫ (в стиле аудио волн) ========== */
.floating-balls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ball {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: floatBall 20s infinite alternate ease-in-out;
    opacity: 0.8;
    will-change: transform;
}

.ball:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 5%;
    left: -5%;
    background: rgba(255,107,59,0.6);
    animation-duration: 16s;
}

.ball:nth-child(2) {
    width: 250px;
    height: 250px;
    top: 50%;
    right: -10%;
    background: rgba(255,140,90,0.5);
    animation-duration: 19s;
    animation-delay: -3s;
}

.ball:nth-child(3) {
    width: 280px;
    height: 280px;
    bottom: 0%;
    left: 5%;
    background: rgba(230,120,70,0.55);
    animation-duration: 22s;
    animation-delay: -5s;
}

.ball:nth-child(4) {
    width: 170px;
    height: 170px;
    top: 25%;
    right: 15%;
    background: rgba(255,160,100,0.6);
    animation-duration: 14s;
    animation-delay: -2s;
}

.ball:nth-child(5) {
    width: 230px;
    height: 230px;
    bottom: 15%;
    left: 75%;
    background: rgba(255,120,70,0.55);
    animation-duration: 18s;
    animation-delay: -4s;
}

@keyframes floatBall {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(40px,-40px) scale(1.2); }
    100% { transform: translate(-40px,40px) scale(0.9); }
}

/* ========== АНИМАЦИИ ========== */
.hero, .pricing-grid, .reviews-grid, .faq-list, .live-stats-container, .activity-feed, .spectrum-container {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero { animation-delay: 0.1s; }
.live-stats-container { animation-delay: 0.2s; }
.pricing-grid { animation-delay: 0.3s; }
.spectrum-container { animation-delay: 0.4s; }
.reviews-grid { animation-delay: 0.5s; }
.activity-feed { animation-delay: 0.6s; }
.faq-list { animation-delay: 0.7s; }

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

/* ========== НАВИГАЦИЯ ========== */
.navbar {
    position: sticky;
    top: 20px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: .8rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 60px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    width: calc(100% - 4rem);
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: .2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.theme-toggle, .login-btn {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    padding: .5rem 1.1rem;
    border-radius: 40px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle:hover, .login-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: #fff;
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.2rem 2rem 3rem;
    position: relative;
    z-index: 2;
}

/* ========== 3D КОНТЕЙНЕР ========== */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.12;
}

/* ========== СТАТИСТИКА ========== */
.live-stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-card {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2.5rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform .2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========== ГЕРОЙ СЕКЦИЯ ========== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2rem 0 3rem;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    max-width: 700px;
    line-height: 1.2;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.hero .subhead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}

/* ========== ЗАГРУЗКА ФАЙЛА ========== */
.upload-card {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: 60px;
    padding: 1.8rem 2.5rem;
    box-shadow: var(--glass-shadow);
    width: fit-content;
    margin: 0 auto;
    transition: transform .2s;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    background: var(--card-bg);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 1px dashed var(--accent-soft);
    cursor: pointer;
    color: var(--text-primary);
    transition: .15s;
}

.file-label i {
    font-size: 2rem;
    color: var(--accent);
}

.file-label:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.02);
}

#audioFile {
    display: none;
}

.conversion-area {
    margin: 2rem 0 1rem;
}

.progress-hidden {
    display: none;
}

.format-selector, .bitrate-selector {
    display: inline-block;
    margin: 0.5rem 0.5rem;
}

.format-select {
    background: var(--glass-bg);
    border: 1px solid var(--accent);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 30px;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 30px;
    transition: width .05s linear;
}

.waveform-container {
    margin: 1rem 0;
    text-align: center;
}

#waveformCanvas {
    max-width: 100%;
    height: auto;
    background: rgba(0,0,0,0.1);
    border-radius: 15px;
}

.fake-dialog {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid #fff;
    border-radius: 40px;
    padding: 2rem;
    max-width: 400px;
    margin: 1.5rem auto;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    padding: .8rem 2rem;
    border-radius: 40px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-primary);
}

/* ========== РЕКОМЕНДАЦИИ ========== */
.recommendations {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem auto;
    justify-content: center;
    max-width: 600px;
}

.format-tag {
    padding: 0.3rem 1rem;
    background: var(--accent);
    color: white;
    border-radius: 30px;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: .2s;
    display: inline-block;
}

.format-tag:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ========== СРАВНЕНИЕ РАЗМЕРОВ ========== */
.size-comparison {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 30px;
    margin: 2rem 0;
    text-align: center;
}

.size-bar-audio {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.format-size {
    background: var(--card-bg);
    padding: 0.8rem;
    border-radius: 20px;
    text-align: center;
    font-size: 0.8rem;
    min-width: 80px;
}

.comparison-note {
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* ========== КОДЕКИ ========== */
.codec-info-container {
    margin: 2rem 0;
}

.codec-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.5rem 0;
    padding: 0.8rem;
    background: var(--card-bg);
    border-radius: 20px;
}

.savings {
    color: #4CAF50;
    font-weight: bold;
    margin-left: auto;
}

/* ========== СПЕКТРУМ ========== */
.spectrum-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.spectrum-container h3 {
    margin-bottom: 1rem;
}

#spectrumCanvas {
    max-width: 100%;
    height: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
}

/* ========== ЛЕНТА АКТИВНОСТИ ========== */
.activity-feed {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 1.8rem;
    margin: 2rem 0;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.activity-feed h3 {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity .3s;
}

.activity-item i {
    color: var(--accent);
}

/* ========== API КОНСОЛЬ ========== */
.api-console {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.api-console pre {
    background: rgba(0,0,0,0.1);
    padding: 1rem;
    border-radius: 20px;
    overflow-x: auto;
    font-size: 0.8rem;
}

/* ========== ЗАГОЛОВКИ ========== */
.section-title {
    font-size: 2.2rem;
    margin: 3rem 0 1.5rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

/* ========== ТАРИФЫ ========== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.price-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 2rem 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: all .2s;
}

.price-card:hover {
    transform: translateY(-6px);
    background: var(--glass-bg);
    border-color: var(--accent);
}

.price-card .price {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: .8rem 0;
}

.price-card ul {
    list-style: none;
    margin: 1.2rem 0;
    color: var(--text-secondary);
}

.price-card li {
    margin: .5rem 0;
}

.buy-btn {
    width: 100%;
    background: var(--accent);
    border: none;
    border-radius: 50px;
    padding: 0.9rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.buy-btn .btn-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.8rem;
}

/* ========== ОТЗЫВЫ ========== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.review-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: .2s;
}

.review-card i {
    color: gold;
    margin-bottom: .5rem;
    display: inline-block;
}

/* ========== FAQ ========== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--faq-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.faq-question {
    padding: 1.2rem 2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    padding: 0 2rem;
    background: rgba(255,255,255,0.1);
    color: var(--text-secondary);
    transition: max-height .3s ease, padding .3s;
    overflow: hidden;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 1rem 2rem 1.5rem;
}

/* ========== ДОСТИЖЕНИЯ ========== */
.achievement-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--glass-bg);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid var(--accent);
    backdrop-filter: blur(5px);
}

/* ========== ТУЛТИПЫ ========== */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid var(--accent);
    animation: fadeIn 0.2s;
    z-index: 10;
    color: var(--text-primary);
}

/* ========== COOKIE NOTICE ========== */
.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 60px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #fff;
    z-index: 100;
    box-shadow: var(--glass-shadow);
}

.cookie-notice button {
    background: var(--accent);
    border: none;
    padding: .5rem 1.5rem;
    border-radius: 40px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    z-index: 200;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border-radius: 50px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    border: 2px solid var(--glass-border);
    margin: 0 auto;
}

.modal input {
    display: block;
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    background: rgba(255,255,255,0.3);
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== ФУТЕР ========== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

/* ========== АНИМАЦИЯ ПОЯВЛЕНИЯ ========== */
.price-card, .review-card, .faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s, transform .6s;
}

.price-card.visible, .review-card.visible, .faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .navbar {
        width: calc(100% - 2rem);
        padding: .6rem 1rem;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-actions {
        gap: 0.8rem;
        justify-content: center;
    }
    
    .theme-toggle span, .login-btn .login-text {
        display: none;
    }
    
    .theme-toggle, .login-btn {
        padding: .5rem .8rem;
    }
    
    .stat-card {
        padding: 1rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .format-selector, .bitrate-selector {
        display: block;
        margin: 0.5rem 0;
    }
}