/* ser.css — страница серий «Красоты», гламурная версия */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Jost:wght@300;400;500;600&display=swap');

:root {
    --night: #0d060c;
    --curtain: #2a0f1d;
    --panel: #1d0f18;
    --gold: #f0c86a;
    --gold-bright: #ffe9b0;
    --gold-deep: #b8862e;
    --rose: #ff9ec2;
    --rose-deep: #d4527f;
    --champagne: #fdf6e8;
    --smoke: #f0e4d0;
    --dim: #b39a90;
}

/* Общие стили */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--night);
    background-image:
        radial-gradient(ellipse 1000px 500px at 75% -10%, rgba(240, 200, 106, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 800px 420px at 10% 0%, rgba(255, 158, 194, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 1200px 600px at 50% 110%, rgba(212, 82, 127, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% -10%, #241019 0%, transparent 55%);
    color: var(--smoke);
    font-family: 'Jost', sans-serif;
    overflow-x: hidden;
}

/* Луч софита над плеером */
body::before {
    content: '';
    position: fixed;
    top: -16%;
    left: 20%;
    width: 60%;
    height: 65vh;
    background: linear-gradient(180deg, rgba(240, 200, 106, 0.1) 0%, transparent 70%);
    border-radius: 0 0 50% 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    animation: spotlightBreath 10s ease-in-out infinite alternate;
}

@keyframes spotlightBreath {
    from { opacity: 0.55; }
    to   { opacity: 1; }
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* Навигация */
.navbar {
    padding: 20px 0;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(240, 200, 106, 0.6), rgba(255, 158, 194, 0.35), transparent) 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--champagne);
    text-shadow: 0 0 18px rgba(240, 200, 106, 0.35);
}

.logo span {
    background: linear-gradient(120deg, var(--gold-deep) 0%, var(--gold-bright) 40%, var(--gold) 60%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.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, text-shadow 0.2s ease;
}

.back-link:hover {
    color: var(--gold-bright);
    text-shadow: 0 0 14px rgba(240, 200, 106, 0.6);
}

/* Сетка: плеер и плейлист */
.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: 8px;
    overflow: hidden;
    border: 1px solid rgba(240, 200, 106, 0.5);
    box-shadow:
        0 0 0 1px rgba(255, 233, 176, 0.12),
        0 0 80px rgba(240, 200, 106, 0.16),
        0 24px 50px rgba(0, 0, 0, 0.65);
    background: #0a0508;
    height: 0;
    padding-bottom: 70.25%;
    animation: rameGlow 6s ease-in-out infinite alternate;
}

@keyframes rameGlow {
    from { box-shadow: 0 0 0 1px rgba(255, 233, 176, 0.1), 0 0 60px rgba(240, 200, 106, 0.12), 0 24px 50px rgba(0, 0, 0, 0.65); }
    to   { box-shadow: 0 0 0 1px rgba(255, 233, 176, 0.16), 0 0 95px rgba(240, 200, 106, 0.22), 0 24px 50px rgba(0, 0, 0, 0.65); }
}

.player-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Плейлист: бархатная афиша */
.episodes-sidebar {
    background: linear-gradient(180deg, #31141f 0%, var(--curtain) 35%, #1c0d14 100%);
    border-radius: 8px;
    border: 1px solid rgba(240, 200, 106, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(240, 200, 106, 0.16);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 0;
    min-height: 100%;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(240, 200, 106, 0.5), transparent) 1;
    position: relative;
}

.sidebar-header span {
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(240, 200, 106, 0.45);
}

.ep-list-scroll {
    overflow-y: auto;
    padding: 15px;
    flex: 1;
}

.ep-list-scroll::-webkit-scrollbar { width: 4px; }

.ep-list-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--gold-deep));
    border-radius: 2px;
}

.ep-list-item {
    display: block;
    position: relative;
    padding: 18px;
    border-radius: 5px;
    margin-bottom: 6px;
    text-decoration: none;
    color: var(--smoke);
    border: 1px solid rgba(242, 231, 211, 0.05);
    border-left: 2px solid rgba(255, 158, 194, 0.25);
    background: rgba(242, 231, 211, 0.03);
    transition: all 0.18s ease;
}

/* искра слева у активной серии */
.ep-list-item.active::after {
    content: '✦';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-bright);
    font-size: 12px;
    text-shadow: 0 0 10px rgba(255, 233, 176, 0.9), 0 0 22px rgba(240, 200, 106, 0.7);
    animation: sparkle 1.6s ease-in-out infinite alternate;
}

@keyframes sparkle {
    from { opacity: 0.55; transform: translateY(-50%) scale(0.9); }
    to   { opacity: 1; transform: translateY(-50%) scale(1.15); }
}

.ep-list-item:hover {
    border-color: rgba(240, 200, 106, 0.4);
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(240, 200, 106, 0.09) 0%, rgba(240, 200, 106, 0.02) 60%);
    color: #fff;
    transform: translateX(3px);
}

.ep-list-item.active {
    border-color: rgba(240, 200, 106, 0.65);
    border-left-color: var(--gold-bright);
    background: linear-gradient(90deg, rgba(255, 158, 194, 0.14) 0%, rgba(240, 200, 106, 0.08) 60%, transparent 100%);
    color: #fff;
    box-shadow: inset 0 0 20px rgba(240, 200, 106, 0.08);
}

.ep-list-item .ep-num {
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.ep-list-item.active .ep-num { color: var(--gold); }

/* Блок текста */
.episode-info-block {
    margin-top: 15px;
    max-width: 1000px;
}

.episode-label {
    font-size: 12px;
    color: var(--rose);
    text-transform: uppercase;
    letter-spacing: 3.5px;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 0 12px rgba(255, 158, 194, 0.45);
}

.episode-info-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 26px rgba(240, 200, 106, 0.28);
}

.episode-info-block h1 span {
    background: linear-gradient(100deg, #8a5f1d 0%, var(--gold) 30%, var(--gold-bright) 50%, var(--gold) 70%, #8a5f1d 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 6s linear infinite;
}

@keyframes shine {
    0%   { background-position: 220% 0; }
    100% { background-position: -40% 0; }
}

.description p {
    color: #d4c6b3;
    line-height: 1.75;
    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.06;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .player-wrapper {
        border-radius: 5px;
        box-shadow: 0 0 30px rgba(240, 200, 106, 0.1), 0 16px 30px rgba(0, 0, 0, 0.55);
        padding-bottom: 90%;
    }
    body::before { opacity: 0.5; }
}

@media (max-width: 480px) {
    .player-wrapper {
        border-radius: 4px;
        box-shadow: 0 0 18px rgba(240, 200, 106, 0.08), 0 12px 24px rgba(0, 0, 0, 0.5);
        padding-bottom: 90%;
    }
}

@media (max-width: 1024px) {
    .main-view-grid { grid-template-columns: 1fr; }
    .episodes-sidebar {
        height: 450px;
        min-height: auto;
        max-height: none;
    }
}
