/* style.css */


/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500;600;700;900&display=swap');

/* Базовый сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Кастомные свойства для удобного контроля над цветовой палитрой */
:root {
    --bg-primary: #0a0a0a;      /* Основной фон - почти черный, как в заставках сериалов */
    --bg-secondary: #121212;    /* Вторичный фон для карточек */
    --bg-card: #141414;         /* Фон карточек */
    --accent: #e63946;          /* Акцентный - тревожный красный (криминальная драма) */
    --accent-glow: rgba(230, 57, 70, 0.15); /* Свечение акцента */
    --text-primary: #f1faee;    /* Основной текст - почти белый */
    --text-secondary: #a8a8a8;  /* Вторичный текст - приглушенный */
    --text-muted: #6c757d;      /* Приглушенный текст */
    --border-subtle: rgba(255, 255, 255, 0.06); /* Едва заметные границы */
    --border-accent: rgba(230, 57, 70, 0.25);   /* Границы с акцентом */
    --glass-bg: rgba(20, 20, 20, 0.7); /* Фон для стеклянных элементов */
    --glass-border: rgba(255, 255, 255, 0.08);  
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6); 
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-glow);
    --font-primary: 'Inter', 'Roboto', sans-serif; /* Современный чистый шрифт */
    --font-display: 'Oswald', 'Impact', sans-serif; /* Рубленый шрифт для заголовков */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

/* Скроллбар в стиле криминальной драмы */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff4757;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Фоновый эффект виньетки */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Эффект "шума" в стиле VHS/помех */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Тонкие горизонтальные линии сканирования */
.scan-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    opacity: 0.4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

/* === НАВБАР === */
.navbar {
    padding: 25px 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo::before {
    content: '⬤';
    font-size: 8px;
    color: var(--accent);
    animation: blink-record 2s infinite;
}

.logo span {
    color: var(--accent);
    position: relative;
}

.logo span::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform-origin: left;
    animation: underline-scan 3s infinite;
}

@keyframes blink-record {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes underline-scan {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.5); }
}

.badge-live {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
        display: flex;
    align-items: center;
    gap: 8px;
}

.badge-live::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.5; }
}

/* === ЗАГОЛОВОК === */
.hero-header {
    margin: 60px 0 40px;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.hero-title span {
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-display);
}

/* === СЕТКА ЭПИЗОДОВ === */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 10px 0;
}

/* === КАРТОЧКА ЭПИЗОДА === */
.episode-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
}

/* Угловой штамп "CASE FILE" */
.episode-card::before {
    content: 'CASE FILE';
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 10px;
    border: 1px solid var(--border-accent);
    border-radius: var(--border-radius-sm);
    opacity: 0.8;
    transform: rotate(2deg);
    transition: var(--transition-fast);
}

/* Контейнер для изображения с эффектом параллакса */
.card-image-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #0d0d0d;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.card-image-stub {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
    opacity: 0.8;
}

/* Текст плейсхолдера вместо emoji */
.card-image-stub::after {
    content: '▶';
    font-size: 48px;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.episode-card:hover .card-image-stub {
    transform: scale(1.1);
}

/* Градиентная полоса-индикатор вверху картинки */
.card-image-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    z-index: 4;
}

/* Контентная часть карточки */
.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    background: linear-gradient(180deg, rgba(20,20,20,0) 0%, rgba(20,20,20,0.95) 15%);
    margin-top: -30px;
    z-index: 3;
}

/* Мета-информация о деле: номер, статус */
.ep-meta {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-meta::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.episode-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.episode-card:hover .episode-title {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.episode-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
    font-family: var(--font-primary);
    font-weight: 400;
}

/* Кнопка воспроизведения */
.play-btn {
    margin-top: auto;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: var(--border-radius-md);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.episode-card:hover .play-btn::before {
    transform: scaleX(1);
}

.episode-card:hover .play-btn {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* Эффекты при наведении на карточку */
.episode-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.episode-card:hover::before {
    color: var(--text-primary);
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(0deg);
}

/* === СЕКЦИЯ FAQ === */
.faq-section {
    margin-top: 60px;
    padding: 40px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* Декоративная рамка-виньетка для FAQ */
.faq-section::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 35px;
    color: var(--text-primary);
    text-align: center;
}

/* Декоративное подчеркивание заголовка */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 15px auto 0;
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.faq-item {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    position: relative;
}

/* Тонкая полоска-индикатор слева */
.faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 2px;
    background: var(--border-subtle);
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-accent);
    transform: translateX(4px);
}

.faq-item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.faq-item.active {
    border-color: var(--border-accent);
    background: #1a1a1a;
}

.faq-item.active::before {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}

.faq-question {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition-fast);
}

.faq-question:hover {
    color: var(--accent);
}

/* Стильный индикатор раскрытия */
.faq-question::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 300;
    color: var(--accent);
    transition: var(--transition-fast);
    flex-shrink: 0;
    margin-left: 15px;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 10px 1.5px;
    background-position: center;
    background-repeat: no-repeat;
}

.faq-item.active .faq-question::after {
    background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
    background-size: 10px 1.5px, 1.5px 10px;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
    padding-top: 0;
    font-family: var(--font-primary);
    font-weight: 400;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-top: 15px;
    opacity: 1;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero-header {
        margin: 30px 0;
        padding-left: 15px;
        border-left-width: 2px;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 42px);
    }

      .logo {
        font-size: 22px;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .faq-section {
        padding: 25px 15px;
    }

    .faq-list {
        grid-template-columns: 1fr;
    }

    .faq-item {
        padding: 18px;
    }

    .faq-question {
        font-size: 15px;
    }

    .faq-answer {
        font-size: 13px;
    }
}

/* Анимация появления элементов при загрузке */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.episode-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Задержка анимации для карточек в сетке */
.episode-card:nth-child(1) { animation-delay: 0.1s; }
.episode-card:nth-child(2) { animation-delay: 0.2s; }
.episode-card:nth-child(3) { animation-delay: 0.3s; }
.episode-card:nth-child(4) { animation-delay: 0.4s; }
.episode-card:nth-child(5) { animation-delay: 0.5s; }
.episode-card:nth-child(6) { animation-delay: 0.6s; }
