/* ser.css — «Айда!»: страница серии, ночной двор */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');

:root {
    --asphalt: #0b0b0c;
    --concrete: #131415;
    --panel: #191a1c;
    --gold: #d2a24c;
    --gold-dim: #9a7a3d;
    --smoke: #d6d3cd;
    --dim: #8b8880;
}

/* Общие стили */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--asphalt);
    background-image:
        radial-gradient(ellipse 900px 400px at 70% -5%, rgba(210, 162, 76, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% -10%, #16151a 0%, transparent 60%);
    color: var(--smoke);
    font-family: 'Roboto', sans-serif;
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Навигация */
.navbar {
    padding: 20px 0;
    border-bottom: 1px solid rgba(210, 162, 76, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--smoke);
}

.logo span { color: var(--gold); }

.back-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover { color: var(--smoke); }

/* Сетка: плеер и плейлист */
.main-view-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    align-items: start;
    margin-bottom: 30px;
}

.player-section { width: 100%; }

.player-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(210, 162, 76, 0.35);
    box-shadow: 0 0 60px rgba(210, 162, 76, 0.08), 0 20px 40px rgba(0, 0, 0, 0.6);
    background: #060608;
    height: 0;
    padding-bottom: 70.25%;
}

.player-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Плейлист */
.episodes-sidebar {
    background: var(--concrete);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(210, 162, 76, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 0;
    min-height: 100%;
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(210, 162, 76, 0.15);
}

.sidebar-header span {
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.ep-list-scroll {
    overflow-y: auto;
    padding: 15px;
    flex: 1;
}

.ep-list-scroll::-webkit-scrollbar { width: 4px; }

.ep-list-scroll::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 2px;
}

.ep-list-item {
    display: block;
    padding: 18px;
    border-radius: 3px;
    margin-bottom: 6px;
    text-decoration: none;
    color: var(--smoke);
    border: 1px solid transparent;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.15s ease;
}

.ep-list-item:hover {
    border-color: rgba(210, 162, 76, 0.35);
    border-left-color: var(--gold);
    background: rgba(210, 162, 76, 0.06);
    color: #fff;
}

.ep-list-item.active {
    border-color: rgba(210, 162, 76, 0.6);
    border-left-color: var(--gold);
    background: rgba(210, 162, 76, 0.12);
    color: #fff;
}

.ep-list-item .ep-num {
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* Блок текста */
.episode-info-block {
    margin-top: 15px;
    max-width: 1000px;
}

.episode-label {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 6px;
}

.episode-info-block h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.65);
}

.episode-info-block h1 span { color: var(--gold); }

.description p {
    color: #bdbab2;
    line-height: 1.7;
    font-size: 15px;
}

/* Зернистость плёнки */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0, 0 0 0 0 0, 0 0 0 0 0, 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.09;
    z-index: 9999;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .player-wrapper {
        border-radius: 3px;
        border-width: 1px;
        box-shadow: 0 0 25px rgba(210, 162, 76, 0.06);
        padding-bottom: 90%;
    }
}

@media (max-width: 480px) {
    .player-wrapper {
        border-radius: 2px;
        box-shadow: 0 0 15px rgba(210, 162, 76, 0.05);
        padding-bottom: 90%;
    }
}

@media (max-width: 1024px) {
    .main-view-grid { grid-template-columns: 1fr; }
    .episodes-sidebar {
        height: 450px;
        min-height: auto;
        max-height: none;
    }
}
