/* --------------------------------------------
   Глобальные настройки
-------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #0a0a0f;
    position: relative;
    min-height: 100vh;
}

/* --------------------------------------------
   ФОН — тёмный с ярким анимированным кодом
-------------------------------------------- */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: 
        linear-gradient(145deg, #0a0a0f 0%, #0f0f1a 40%, #14141e 70%, #0a0a0f 100%);
    overflow: hidden;
}

/* Сетка для технологичности */
.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(6, 214, 160, 0.04) 40px,
            rgba(6, 214, 160, 0.04) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            rgba(6, 214, 160, 0.03) 80px,
            rgba(6, 214, 160, 0.03) 81px
        );
    pointer-events: none;
}

/* Градиентные пятна с яркими акцентами */
.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(6, 214, 160, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(96, 165, 250, 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 214, 160, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Анимированные строки кода — ЯРКИЕ! */
.code-line {
    position: absolute;
    font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
    white-space: nowrap;
    animation: floatCode linear infinite;
    user-select: none;
    pointer-events: none;
    font-weight: 500;
    text-shadow: 0 0 20px currentColor;
}

@keyframes floatCode {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    92% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(2deg) scale(1.1);
        opacity: 0;
    }
}

/* --------------------------------------------
   СТЕКЛЯННАЯ ПЛАШКА — glassmorphism
-------------------------------------------- */
.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    width: 100%;
    max-width: 720px;
}

.banner {
    width: 100%;
    padding: 3.5rem 3rem;
    text-align: center;
    border-radius: 3rem;
    transition: all 0.4s ease;
}

/* ★ СТЕКЛЯННЫЙ ЭФФЕКТ ★ */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.7),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(6, 214, 160, 0.12);
    color: #06d6a0;
    border: 1px solid rgba(6, 214, 160, 0.15);
}

.topic {
    font-size: 4.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 20%, #06d6a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.2rem 0 0.1rem;
    word-break: break-word;
    transition: opacity 0.25s ease, transform 0.2s ease;
    text-shadow: 0 0 60px rgba(6, 214, 160, 0.15);
}

@media (max-width: 500px) {
    .topic {
        font-size: 2.8rem;
    }
    .banner {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, rgba(6, 214, 160, 0.2), rgba(6, 214, 160, 0.6));
    border-radius: 6px;
    margin: 0.5rem auto 0.3rem;
}

.subtext {
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.01em;
    margin-top: 0.2rem;
}

/* --------------------------------------------
   КНОПКА — стеклянная, стильная
-------------------------------------------- */
.next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.6rem;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.next-btn:hover {
    background: rgba(6, 214, 160, 0.10);
    border-color: rgba(6, 214, 160, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 16px 48px rgba(6, 214, 160, 0.12),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.next-btn:active {
    transform: translateY(0px) scale(0.97);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.next-btn svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    stroke: rgba(255, 255, 255, 0.7);
}

.next-btn:hover svg {
    transform: translateX(4px);
    stroke: #06d6a0;
}

/* --------------------------------------------
   ИНДИКАТОР ТЕМ (точки)
-------------------------------------------- */
.theme-indicator {
    display: flex;
    gap: 12px;
    margin-top: 0.5rem;
}

.dot-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    cursor: default;
}

.dot-indicator.active {
    background: #06d6a0;
    box-shadow: 0 0 25px rgba(6, 214, 160, 0.4);
    border-color: #06d6a0;
    transform: scale(1.3);
}

/* --------------------------------------------
   Анимация темы
-------------------------------------------- */
.topic.fade-out {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
}

.topic.fade-in {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --------------------------------------------
   АДАПТИВНОСТЬ
-------------------------------------------- */
@media (max-width: 768px) {
    .code-line {
        opacity: 0.6 !important;
    }
}

@media (max-width: 480px) {
    .topic {
        font-size: 2.4rem;
    }
    .banner {
        padding: 1.5rem 1rem;
        border-radius: 1.5rem;
    }
    .next-btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
}

/* --------------------------------------------
   ОПТИМИЗАЦИЯ ДЛЯ МОБИЛЬНЫХ
-------------------------------------------- */
@media (max-width: 768px) {
    .code-line {
        animation-duration: 25s !important;
        will-change: transform, opacity;
    }
}

@media (max-width: 480px) {
    .code-line {
        animation-duration: 20s !important;
        opacity: 0.6 !important;
    }
    .banner {
        padding: 1.2rem 1rem;
    }
    .glass {
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }
}