

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800;900&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

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

:root {
    --bg-primary: #0c0d0f;
    --bg-secondary: #121317;
    --bg-card: #17181c;
    --accent: #e8b23c;
    --accent-glow: rgba(232, 178, 60, 0.14);
    --stamp-red: #c94436;
    --text-primary: #ece8df;
    --text-secondary: #9d9a92;
    --text-muted: #6f6c65;
    --border-subtle: rgba(236, 232, 223, 0.09);
    --border-accent: rgba(232, 178, 60, 0.4);
    --glass-bg: rgba(18, 19, 23, 0.78);
    --glass-border: rgba(236, 232, 223, 0.14);
    --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 16px 44px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--border-accent);
    --font-primary: 'IBM Plex Sans', 'Arial', sans-serif;
    --font-display: 'Unbounded', 'Arial Black', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --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: 2px;
    --border-radius-md: 4px;
    --border-radius-lg: 6px;
}

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 45%, rgba(0, 0, 0, 0.75) 100%),
        repeating-linear-gradient(0deg,
            transparent 0, transparent 27px,
            rgba(255, 255, 255, 0.018) 27px, rgba(255, 255, 255, 0.018) 29px),
        repeating-linear-gradient(90deg,
            transparent 0, transparent 60px,
            rgba(255, 255, 255, 0.012) 60px, rgba(255, 255, 255, 0.012) 62px);
    pointer-events: none;
    z-index: 1;
}

/* Плёночное зерно */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.05;
    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 3px,
        rgba(0, 0, 0, 0.12) 3px,
        rgba(0, 0, 0, 0.12) 4px
    );
    opacity: 0.35;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 2;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: #3a3c42;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === НАВБАР === */
.navbar {
    padding: 20px 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(12, 13, 15, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(90deg,
        var(--border-accent) 0, var(--border-accent) 14px,
        transparent 14px, transparent 22px);
    opacity: 0.35;
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    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: 10px;
    color: var(--accent);
    animation: blink-record 2s infinite;
}

.logo span {
    color: var(--accent);
    position: relative;
}

.logo span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    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.15; }
}

@keyframes underline-scan {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0.5); }
}

.back-link {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
}

.back-link::before {
    content: '←';
    color: var(--accent);
}

.back-link:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
}

/* === СЕТКА: ПЛЕЕР + ПЛЕЙЛИСТ === */
.main-view-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

.player-section {
    width: 100%;
}

/* Плеер — «вещдок на столе» */
.player-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-accent);
    box-shadow: 0 0 40px var(--accent-glow);
    background: #08090a;
    height: 0;
    padding-bottom: 65.25%;
    transition: var(--transition-smooth);
}




/* Внутренняя рамка-метка на плёнке */
.player-wrapper::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(236, 232, 223, 0.15);
    border-radius: var(--border-radius-md);
    pointer-events: none;
    z-index: 3;
}

.player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius-lg);
}

/* Сайдбар — опись томов */
.episodes-sidebar {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    min-height: 100%;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    background:
        repeating-linear-gradient(0deg,
            transparent 0, transparent 6px,
            rgba(236, 232, 223, 0.02) 6px, rgba(236, 232, 223, 0.02) 7px);
}

.sidebar-header::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.sidebar-header span {
    color: var(--accent);
    font-size: 12px;
}

/* Скролл-список */
.ep-list-scroll {
    overflow-y: auto;
    padding: 12px;
    flex: 1;
}

.ep-list-scroll::-webkit-scrollbar {
    width: 4px;
}

.ep-list-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

/* Элемент описи */
.ep-list-item {
    display: block;
    padding: 21px 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid transparent;
    background: rgba(236, 232, 223, 0.02);
    transition: var(--transition-fast);
    position: relative;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ep-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 2px;
    background: transparent;
    transition: var(--transition-fast);
}

.ep-list-item:hover {
    border-color: var(--border-accent);
    background: rgba(232, 178, 60, 0.06);
    color: var(--text-primary);
    transform: translateX(3px);
}

.ep-list-item:hover::before {
    background: var(--accent);
}

.ep-list-item.active {
    border-color: var(--border-accent);
    background: rgba(232, 178, 60, 0.1);
    color: var(--text-primary);
}

.ep-list-item.active::before {
    background: var(--accent);
}

.ep-list-item .ep-num {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    margin-bottom: 4px;
    opacity: 0.9;
}

/* Блок информации об эпизоде — «лист дела» */
.episode-info-block {
    margin-top: 25px;
    max-width: 1000px;
    padding-left: 22px;
    border-left: 3px solid var(--accent);
    position: relative;
}

.episode-label {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.episode-info-block h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1.15;
}

.episode-info-block h1 span {
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent), #f6d47c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 14px;
    font-weight: 400;
    
}

/* === АДАПТИВ === */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .main-view-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .episodes-sidebar {
        min-height: auto;
        max-height: 400px;
    }

    .episode-info-block {
        margin-top: 20px;
    }

    .episode-info-block h1 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .logo {
        font-size: 19px;
    }

    .ep-list-item {
        padding: 12px 14px;
        font-size: 13px;
    }

    .description p {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .player-wrapper {
        border-radius: 6px;
        border-width: 1px;
        box-shadow: 0 0 20px rgba(232, 178, 60, 0.12);
        padding-bottom: 90%;
    }
}

@media (max-width: 480px) {
    .player-wrapper {
        border-radius: 4px;
        box-shadow: 0 0 15px rgba(232, 178, 60, 0.1);
        padding-bottom: 90%;
    }
}

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

.player-wrapper,
.episodes-sidebar,
.episode-info-block {
    animation: fadeInUp 0.6s ease forwards;
}
