:root {
    --bg-main: #05060a;
    --bg-panel: #10121b;
    --bg-header: #090a11;
    --accent: #ffb74d;
    --accent-soft: rgba(255, 183, 77, 0.12);
    --accent-strong: #ffb300;
    --text-main: #f5f7ff;
    --text-muted: #9da3ba;
    --border-soft: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.72);
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top, #191a2c 0, #05060a 40%);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== ШАПКА ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(5,6,10,0.96), rgba(5,6,10,0.9) 60%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 0, #ffd27f 0, #ff9800 40%, #ff6d00 80%);
    box-shadow: 0 0 20px rgba(255, 160, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1c1305;
    font-size: 18px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text-main {
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 15px;
}

.logo-text-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Navigation - Desktop */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.nav a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: 0.18s border-color, 0.18s background, 0.18s color;
    white-space: nowrap;
}

.nav a:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.04);
}

.nav a.nav-active {
    color: #05060a;
    background: var(--accent);
    border-color: transparent;
}

/* ===== ОБЩИЕ ОТСТУПЫ ===== */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px 50px;
}

/* ===== БАННЕР-СЛАЙДЕР ===== */
.banner {
    margin-top: 14px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    background: radial-gradient(circle at 0 0, rgba(255,255,255,0.02), transparent 55%), #080812;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.banner-slides {
    position: relative;
}

.banner-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    padding: 24px;
    min-height: 400px;
}

.banner-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.banner-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 999px;
    background: rgba(5,6,10,0.7);
    color: var(--accent);
    border: 1px solid rgba(255,183,77,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
}

.banner-dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.35);
}

.banner-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 4px 0;
}

.banner-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.banner-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 600px;
}

.banner-buttons {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}

.banner-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: #ffb74d;
    color: #05060a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 18px rgba(255, 183, 77, 0.6);
    transition: transform 0.2s;
}

.banner-btn:hover {
    transform: translateY(-2px);
}

.banner-btn--ghost {
    background: rgba(255,255,255,0.02);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: none;
}

.banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.banner-tag {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(5,6,10,0.7);
}

.banner-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-poster-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 2/3;
    background: radial-gradient(circle at 50% 0, rgba(255,255,255,0.1), rgba(18,14,8,0.9));
}

.banner-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-play-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.0), rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.banner-poster-wrap:hover .banner-play-overlay {
    opacity: 1;
}

.banner-play-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px rgba(255,255,255,0.45);
}

.banner-play-circle-inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 0, #ffe082 0, #ffb74d 45%, #f57c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2a1a05;
    padding-left: 3px;
}

.banner-rating-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(16,27,12,0.9);
    color: #b2ff59;
    border: 1px solid rgba(178,255,89,0.6);
}

.banner-timeline {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    height: 3px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.22);
}

.banner-timeline-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffb74d, #ff9800);
    transition: width 0.25s linear;
}

.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(5,6,10,0.8);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 16px rgba(0,0,0,0.7);
    transition: all 0.3s;
}

.banner-nav:hover {
    background: rgba(255,255,255,0.1);
}

.banner-nav--prev { left: 12px; }
.banner-nav--next { right: 12px; }

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot--active {
    width: 20px;
    background: #ffb74d;
}

/* ===== СЕКЦИИ С КАРТОЧКАМИ ===== */
.section {
    margin-top: 40px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
}

.section-sub {
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.section-link {
    font-size: 14px;
    color: var(--accent-strong);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s;
}

.section-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(16,18,27,0.98);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.card:hover .card-poster img {
    transform: scale(1.05);
}

.card-type,
.card-rating {
    position: absolute;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.card-type {
    bottom: 8px;
    left: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}

.card-rating {
    top: 8px;
    left: 8px;
    background: rgba(15, 184, 96, 0.16);
    color: #7ceaa0;
}

.card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: var(--text-muted);
}

/* ===== ПЛЕЙСХОЛДЕРЫ ===== */
.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.placeholder-card {
    background: rgba(16,18,27,0.95);
    border-radius: 16px;
    border: 1px dashed rgba(255,255,255,0.18);
    padding: 20px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== ФУТЕР ===== */
.footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #05060a;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffffff;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 1024px) {
    .banner-slide {
        grid-template-columns: 1.4fr 1fr;
        gap: 16px;
        padding: 20px;
        min-height: 380px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
}

/* MOBILE - COMPACT BANNER & 2-COLUMN CARDS */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 16px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 6px;
        gap: 6px;
        max-width: calc(100vw - 150px);
    }
    
    .nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav a {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .wrap {
        padding: 16px 16px 40px;
    }
    
    /* COMPACT BANNER */
    .banner {
        margin-top: 10px;
        border-radius: 16px;
        min-height: auto;
    }
    
    .banner-slide {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
        min-height: auto;
    }
    
    .banner-left {
        order: 2;
        gap: 8px;
    }
    
    .banner-right {
        order: 1;
    }
    
    .banner-label {
        align-self: center;
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .banner-title {
        font-size: 18px;
        text-align: center;
        margin: 2px 0;
        line-height: 1.3;
    }
    
    .banner-meta {
        text-align: center;
        font-size: 12px;
    }
    
    .banner-desc {
        display: none; /* Скрываем описание на мобилке */
    }
    
    .banner-buttons {
        justify-content: center;
        margin: 6px 0;
        gap: 8px;
    }
    
    .banner-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .banner-tags {
        display: none; /* Скрываем теги на мобилке */
    }
    
    .banner-poster-wrap {
        max-width: 200px;
        margin: 0 auto;
        border-radius: 12px;
    }
    
    .banner-play-circle {
        width: 50px;
        height: 50px;
    }
    
    .banner-play-circle-inner {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .banner-nav {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .banner-nav--prev { left: 8px; }
    .banner-nav--next { right: 8px; }
    
    .banner-dots {
        bottom: 8px;
    }
    
    /* 2-COLUMN CARDS */
    .section {
        margin-top: 24px;
    }
    
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .section-sub {
        font-size: 12px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-body {
        padding: 10px;
        gap: 4px;
    }
    
    .card-title {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .card-meta {
        font-size: 11px;
    }
    
    .card-desc {
        display: none; /* Скрываем описание карточек на мобилке */
    }
    
    .card-type,
    .card-rating {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .footer-inner {
        padding: 20px 16px;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 8px 12px;
        gap: 12px;
    }
    
    .logo-mark {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .logo-text-main {
        font-size: 14px;
    }
    
    .logo-text-sub {
        font-size: 10px;
    }
    
    .nav {
        gap: 4px;
        max-width: calc(100vw - 120px);
    }
    
    .nav a {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .wrap {
        padding: 12px 12px 30px;
    }
    
    .banner {
        margin-top: 8px;
        border-radius: 14px;
    }
    
    .banner-slide {
        padding: 14px;
        gap: 12px;
    }
    
    .banner-title {
        font-size: 16px;
    }
    
    .banner-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .banner-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        font-size: 12px;
        padding: 7px 12px;
    }
    
    .banner-poster-wrap {
        max-width: 160px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .card-body {
        padding: 8px;
    }
    
    .card-title {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .nav a {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .banner-title {
        font-size: 15px;
    }
    
    .banner-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .card-body {
        padding: 6px;
    }
    
    .card-title {
        font-size: 11px;
    }
}

/* MOBILE MENU BURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 1px;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MOBILE NAV MENU */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-main);
    z-index: 100;
    padding: 80px 20px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-panel);
    font-size: 16px;
    transition: all 0.3s;
}

.mobile-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.mobile-nav a:hover {
    background: rgba(255,255,255,0.05);
}

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-inner {
        position: relative;
    }
}

@media (max-width: 480px) {
    .mobile-nav a {
        padding: 14px 18px;
        font-size: 15px;
    }
}













        /* === MOBILE MENU BURGER === */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 1px;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === MOBILE NAV OVERLAY === */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-main);
    z-index: 100;
    padding: 80px 20px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    background: var(--bg-panel);
    font-size: 16px;
    color: #f5f7ff;
    transition: all 0.3s;
}

.mobile-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.mobile-nav a:hover {
    background: rgba(255,255,255,0.05);
}

/* на мобильных прячем .nav и показываем бургер */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}


/* на мобильных прячем .nav и показываем бургер */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }
    
    .header-inner {
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }
}
























/* Исправление для списка серий - центрирование */
.seasons-block {
    width: 100%;
    max-width: 100%;
    margin: 20px auto 0;
}

.episodes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
    justify-content: center;
}

/* Пагинация */
.episodes-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
    width: 100%;
}

.pagination-btn {
    background: #2d8cf0;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    font-family: inherit;
}

.pagination-btn:hover:not(:disabled) {
    background: #1a7bdc;
}

.pagination-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    color: #888;
    font-size: 14px;
    min-width: 150px;
    text-align: center;
    font-weight: 500;
}

/* Для мобилок */
@media (max-width: 768px) {
    .episodes-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .episodes-pagination {
        gap: 10px;
        margin: 12px 0;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
