:root {
    --accent-1: #4A9EFF;
    --accent-2: #A45CFF;
    --accent-1-soft: rgba(74, 158, 255, 0.35);
    --accent-2-soft: rgba(164, 92, 255, 0.35);
    --bg-dark: #0b0b1a;
    --bg-panel: #1a1a3e;
    --text-muted: #8a92a5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-dark);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Прелоадер ===== */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; padding: 20px; }
.preloader-logo {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(24px);
    animation: preloaderIn 1.1s cubic-bezier(0.2, 0.9, 0.3, 1) 0.2s forwards;
    line-height: 1.1;
}
.preloader-sub {
    font-size: 0.95rem;
    color: #666;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 16px;
    opacity: 0;
    animation: preloaderIn 1s ease 1s forwards;
}
.preloader-bar {
    width: 220px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 28px auto 0;
    overflow: hidden;
    opacity: 0;
    animation: preloaderIn 1s ease 1.2s forwards;
}
.preloader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    animation: barFill 2s ease 1.4s forwards;
}
@keyframes preloaderIn { to { opacity: 1; transform: translateY(0); } }
@keyframes barFill { to { width: 100%; } }

/* ===== HERO ===== */
.hero {
    position: relative;
    width: 100%;
    height: 52vh;
    min-height: 420px;
    max-height: 560px;
    background: var(--bg-dark);
    overflow: hidden;
}

.hero-video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
}

/* Псевдоэлемент отключён — виньетка идёт отдельным слоем */
.hero-video-wrap::after {
    display: none;
}

/* Видео: заполняет контейнер, сохраняя пропорции, обрезает по краям */
.hero-video {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 72%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 8%,
        rgba(0, 0, 0, 0.7) 18%,
        #000 30%,
        #000 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 8%,
        rgba(0, 0, 0, 0.7) 18%,
        #000 30%,
        #000 100%
    );
}

/* Виньетка: слева и снизу, плавный градиент в фон */
.hero-vignette {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    z-index: 3 !important;
    pointer-events: none !important;
    background:
        linear-gradient(
            to right,
            #0b0b1a 0%,
            #0b0b1a 28%,
            rgba(11, 11, 26, 0.95) 38%,
            rgba(11, 11, 26, 0.78) 48%,
            rgba(11, 11, 26, 0.5) 58%,
            rgba(11, 11, 26, 0.24) 68%,
            rgba(11, 11, 26, 0.06) 78%,
            rgba(11, 11, 26, 0) 88%
        ),
        linear-gradient(
            to top,
            #0b0b1a 0%,
            #0b0b1a 6%,
            rgba(11, 11, 26, 0.92) 12%,
            rgba(11, 11, 26, 0.72) 20%,
            rgba(11, 11, 26, 0.42) 30%,
            rgba(11, 11, 26, 0.16) 42%,
            rgba(11, 11, 26, 0) 55%
        );
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 6%;
    transform: translateY(-50%);
    z-index: 5;
    max-width: 620px;
    width: 45%;
    text-align: left;
}

.hero-title-img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    margin-bottom: 24px;
}
.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 1rem;
    color: #dfe3ee;
}
.hero-meta .dot { color: #6a7388; }
.age-rating {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 8px 24px var(--accent-2-soft);
    font-family: inherit;
}
.btn-watch .btn-icon { width: 20px; height: 20px; }
.btn-watch:hover { transform: translateY(-2px); box-shadow: 0 12px 32px var(--accent-2-soft); }

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    transition: 0.25s;
    backdrop-filter: blur(10px);
    font-family: inherit;
}
.btn-share .btn-icon { width: 18px; height: 18px; }
.btn-share:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--accent-1); }

.sound-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: 0.2s;
}
.sound-toggle:hover { background: rgba(0, 0, 0, 0.75); border-color: var(--accent-1); }
.sound-toggle .icon { width: 22px; height: 22px; }
.sound-toggle .icon-sound-on { display: none; }
.sound-toggle.unmuted .icon-sound-off { display: none; }
.sound-toggle.unmuted .icon-sound-on { display: block; }

/* ===== MAIN ===== */
.main-content {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 24px 60px;
    width: 100%;
}

.episodes-section { margin-bottom: 56px; }
.episodes-section h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #eaeef7;
}
.episodes-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) transparent;
}
.episodes-carousel::-webkit-scrollbar { height: 6px; }
.episodes-carousel::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 10px; }
.episodes-carousel::-webkit-scrollbar-thumb { background: var(--accent-1-soft); border-radius: 10px; }

.episode-card {
    flex: 0 0 280px;
    height: 165px;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    scroll-snap-align: start;
    overflow: hidden;
    transition: 0.25s;
    background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.06);
}
.episode-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-1-soft);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
.episode-card .ep-number-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}
.episode-card .ep-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 55%);
    z-index: 1;
}
.loading-text { color: #888; padding: 20px 0; }

.description-section {
    margin-bottom: 48px;
    max-width: 780px;
}
.description-section h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #eaeef7;
}
.description-body {
    position: relative;
    max-height: 90px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.description-body::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    pointer-events: none;
    transition: opacity 0.3s;
}
.description-body.expanded { max-height: 1200px; }
.description-body.expanded::after { opacity: 0; }
.description-body p {
    color: #c9cfe0;
    line-height: 1.7;
    font-size: 1.05rem;
}
.desc-toggle-btn {
    display: inline-block;
    margin-top: 12px;
    background: transparent;
    border: none;
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    transition: 0.2s;
}
.desc-toggle-btn:hover { color: var(--accent-2); }

.info-section { margin-bottom: 40px; }
.info-section h2 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #eaeef7;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
    max-width: 900px;
}
.info-row {
    display: flex;
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
    line-height: 1.5;
}
.info-label {
    color: var(--text-muted);
    min-width: 180px;
    flex-shrink: 0;
}
.info-value { color: #eaeef7; }

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) and (pointer: coarse),
       (max-width: 600px) {
    .hero {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 0;
        display: block;
        overflow: visible;
        background: var(--bg-dark);
    }

    .hero-video-wrap {
        position: relative;
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .hero-video {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center;
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0,0,0,0.6) 82%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0,0,0,0.6) 82%, transparent 100%);
    }

    .hero-vignette {
        display: none !important;
    }

    .sound-toggle {
        top: 16px;
        right: 16px;
        z-index: 10;
    }

    .hero-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        max-width: 100%;
        width: 100%;
        padding: 8px 20px 32px;
        margin-top: -40px;
        text-align: center;
        z-index: 5;
    }

    .hero-title-img {
        margin: 0 auto 12px;
        max-height: 100px;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .hero-meta {
        justify-content: center;
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn-watch,
    .btn-share {
        width: 100%;
    }

    .main-content {
        margin-top: 24px;
        padding: 0 16px 40px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .info-label {
        min-width: 140px;
        font-size: 0.88rem;
    }

    .info-value {
        font-size: 0.88rem;
    }

    .episodes-section h2,
    .description-section h2,
    .info-section h2 {
        font-size: 1.3rem;
    }

    .episode-card {
        flex: 0 0 220px;
        height: 130px;
    }
}

@media (max-width: 700px) {
    .preloader-logo { font-size: 2.6rem; }
    .preloader-sub { font-size: 0.75rem; letter-spacing: 0.3em; }
    .preloader-bar { width: 160px; }
}

/* ===== Попап «Поделиться» ===== */
.share-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 12, 0.75);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: shareFadeIn 0.22s ease;
}
@keyframes shareFadeIn { from { opacity: 0; } to { opacity: 1; } }
.share-popup {
    background: linear-gradient(160deg, rgba(28, 28, 52, 0.98), rgba(15, 15, 32, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 36px 28px 24px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
    animation: sharePopupIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
    text-align: center;
}
@keyframes sharePopupIn {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.share-popup-close {
    position: absolute;
    top: 14px; right: 14px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.share-popup-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); transform: rotate(90deg); }
.share-popup-badge {
    width: 64px; height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    box-shadow: 0 12px 32px rgba(74, 158, 255, 0.35);
}
.share-popup-badge svg { width: 28px; height: 28px; color: #fff; }
.share-popup-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.share-popup-sub { font-size: 0.9rem; color: #8089a0; margin-bottom: 24px; }
.share-popup-field {
    display: flex; align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px 4px 4px 14px;
    transition: 0.25s;
    margin-bottom: 12px;
}
.share-popup-field:focus-within { border-color: rgba(74, 158, 255, 0.5); box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12); }
.share-popup-input {
    flex: 1; min-width: 0;
    padding: 12px 8px 12px 0;
    font-size: 0.88rem;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: #c9d1e0;
    background: transparent;
    border: none;
    outline: none;
    user-select: all;
}
.share-popup-copy-inline {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
    cursor: pointer;
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.share-popup-copy-inline:hover { transform: translateY(-1px); }

/* ===== Плашка с логотипами продакшна ===== */
.top-brandbar {
    width: 100%;
    height: 56px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top-brandbar-logo {
    max-height: 36px;
    max-width: 90%;
    height: auto;
    width: auto;
    display: block;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .top-brandbar {
        height: 44px;
        padding: 0 16px;
    }
    .top-brandbar-logo {
        max-height: 28px;
    }
}


/* ===== Плашка с логотипами продакшна ===== */
.top-brandbar {
    width: 100%;
    height: 56px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.top-brandbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.top-brandbar-logo {
    max-height: 36px;
    max-width: 90%;
    height: auto;
    width: auto;
    display: block;
    opacity: 0.85;
}
@media (max-width: 768px) {
    .top-brandbar { height: 44px; padding: 0 16px; }
    .top-brandbar-logo { max-height: 28px; }
}

/* ===== Страница «О проекте» ===== */
.about-page {
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.about-nav {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 24px 0;
}
.about-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
}
.about-nav-back:hover {
    color: #fff;
}
.about-nav-back svg { flex-shrink: 0; }

.about-main {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px 80px;
    flex: 1;
}

.about-hero {
    text-align: center;
    margin-bottom: 64px;
}
.about-label {
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.about-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 20px;
}
.about-subtitle {
    font-size: 1.15rem;
    color: #c9cfe0;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 56px;
}
.about-section h2 {
    font-size: 1.6rem;
    font-weight: 500;
    color: #eaeef7;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.about-section p {
    color: #c9cfe0;
    line-height: 1.75;
    font-size: 1.05rem;
    margin-bottom: 16px;
}
.about-section p:last-child {
    margin-bottom: 0;
}

.about-section blockquote {
    margin: 24px 0 0;
    padding: 20px 24px;
    background: rgba(74, 158, 255, 0.06);
    border-left: 3px solid var(--accent-1);
    border-radius: 0 12px 12px 0;
    color: #eaeef7;
    font-size: 1.05rem;
    line-height: 1.6;
    font-style: italic;
}

.about-help {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.08), rgba(164, 92, 255, 0.08));
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    margin-bottom: 56px;
}
.about-help-title {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8089a0;
    margin-bottom: 16px;
}
.about-help-phone {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 12px;
}
.about-help-text {
    font-size: 0.95rem;
    color: #c9cfe0;
    line-height: 1.55;
}

.about-team {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.about-team-row {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.55;
}
.about-team-row:last-child {
    border-bottom: none;
}
.about-team-role {
    color: var(--text-muted);
    font-size: 0.95rem;
    min-width: 140px;
    flex-shrink: 0;
}
.about-team-names {
    color: #eaeef7;
    font-size: 0.95rem;
}

.about-cta {
    text-align: center;
    margin-top: 64px;
}
.about-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 44px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 60px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 24px var(--accent-2-soft);
    transition: 0.25s;
}
.about-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-2-soft);
}

.about-footer {
    text-align: center;
    padding: 24px 20px;
    color: #4a5265;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

@media (max-width: 700px) {
    .about-main { padding: 24px 16px 60px; }
    .about-title { font-size: 2.8rem; }
    .about-subtitle { font-size: 1rem; }
    .about-section h2 { font-size: 1.35rem; }
    .about-section p { font-size: 1rem; }
    .about-help { padding: 28px 20px; }
    .about-help-phone { font-size: 1.7rem; }
    .about-team-row {
        flex-direction: column;
        gap: 4px;
    }
    .about-team-role { min-width: auto; }
    .about-cta-btn { padding: 16px 32px; font-size: 1rem; }
}

/* ===== Футер главной ===== */
.site-footer {
    text-align: center;
    padding: 24px 20px 40px;
}
.site-footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: 0.2s;
}
.site-footer-link:hover {
    color: #fff;
}
