:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --orange: #ea580c;
    --accent: linear-gradient(135deg, #f59e0b, #ea580c);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 32%), linear-gradient(180deg, #0f172a 0%, #020617 48%, #000 100%);
    color: var(--text);
    min-height: 100vh;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.main-nav a,
.quick-nav a {
    color: #cbd5e1;
    border-radius: 12px;
    transition: 0.2s ease;
}

.main-nav a {
    padding: 10px 14px;
}

.main-nav a:hover,
.main-nav a.active,
.quick-nav a:hover {
    background: rgba(245, 158, 11, 0.16);
    color: #fff;
}

.top-search {
    width: 230px;
}

.top-search input,
.large-search input,
.inline-filter input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text);
    outline: none;
    padding: 12px 14px;
}

.top-search input:focus,
.large-search input:focus,
.inline-filter input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: #fff;
    cursor: pointer;
}

.quick-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.quick-nav a {
    white-space: nowrap;
    padding: 7px 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    font-size: 13px;
}

.hero {
    position: relative;
    height: min(72vh, 680px);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(180deg, transparent 40%, #020617 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 76px;
    width: min(680px, calc(100% - 64px));
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 12px;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-intro p {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
    margin: 20px 0;
}

.hero-tags,
.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-line span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 6px 10px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.large-search button,
.inline-filter button {
    border: 0;
    border-radius: 14px;
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.large-search button,
.inline-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    color: #fff;
}

.primary-btn:hover,
.secondary-btn:hover,
.large-search button:hover,
.inline-filter button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.68);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: #f59e0b;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 22px;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-title h2,
.rank-copy h2,
.content-card h2,
.related-panel h2 {
    margin: 0;
    font-size: 28px;
}

.search-panel p,
.section-title p,
.rank-copy p,
.content-card p,
.related-panel p {
    color: var(--muted);
    line-height: 1.8;
}

.large-search,
.inline-filter {
    display: flex;
    gap: 12px;
}

.section-block {
    padding: 56px 0 18px;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-title a {
    color: #fbbf24;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.small-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.13);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.podium-card:hover img {
    transform: scale(1.08);
}

.poster-badge,
.rank-mark {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.rank-mark {
    left: auto;
    right: 12px;
    background: var(--accent);
}

.movie-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 190px;
}

.movie-card h3,
.podium-card h2,
.ranking-item h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card p,
.podium-card p,
.ranking-item p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #f8fafc;
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    color: #cbd5e1;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    min-height: 190px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #0f172a;
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.category-card.tall {
    min-height: 240px;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after,
.podium-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: #dbeafe;
    font-size: 13px;
    line-height: 1.6;
}

.rank-section {
    margin-top: 48px;
    padding: 58px 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 32px;
    align-items: center;
}

.rank-list,
.ranking-list {
    display: grid;
    gap: 12px;
}

.rank-row,
.ranking-item {
    display: grid;
    align-items: center;
    gap: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row {
    grid-template-columns: 54px 1fr auto;
    padding: 14px 18px;
}

.rank-row:hover,
.ranking-item:hover {
    border-color: rgba(245, 158, 11, 0.55);
    transform: translateX(4px);
}

.rank-row span,
.ranking-no {
    color: #fbbf24;
    font-weight: 900;
}

.rank-row em {
    color: #fff;
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    padding: 86px 0 64px;
    background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
}

.page-hero p {
    max-width: 820px;
}

.inline-filter {
    max-width: 720px;
    margin-top: 26px;
}

.overview-grid {
    margin-top: -32px;
    position: relative;
    z-index: 2;
}

.podium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.podium-card {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: 26px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #0f172a;
    border: 1px solid var(--line);
}

.podium-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.35s ease;
}

.podium-card span,
.podium-card h2,
.podium-card p {
    position: relative;
    z-index: 1;
}

.podium-card span {
    color: #fbbf24;
    font-weight: 900;
    margin-bottom: 10px;
}

.ranking-item {
    grid-template-columns: 60px 78px 1fr 58px;
    padding: 12px;
}

.ranking-item img {
    width: 78px;
    height: 105px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-item strong {
    color: #fbbf24;
    font-size: 20px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.05);
    opacity: 0.55;
}

.detail-head {
    position: relative;
    z-index: 2;
    padding-top: 48px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    margin-bottom: 34px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-intro {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    align-items: end;
}

.detail-poster {
    width: 300px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta {
    margin: 20px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
    padding: 50px 0 70px;
}

.detail-main,
.related-list {
    display: grid;
    gap: 22px;
}

.player-panel,
.content-card,
.related-panel {
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.player-panel {
    overflow: hidden;
}

.video-shell {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
}

.stream-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.7));
    color: #fff;
    cursor: pointer;
}

.play-cover span {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
    font-size: 30px;
}

.play-cover strong {
    font-size: 18px;
}

.player-panel.is-playing .play-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-card,
.related-panel {
    padding: 24px;
}

.content-card p {
    color: #dbeafe;
    font-size: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.info-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.44);
    border: 1px solid var(--line);
}

.info-grid dt {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.info-grid dd {
    margin: 0;
    color: #fff;
    font-weight: 800;
}

.related-panel {
    position: sticky;
    top: 92px;
}

.compact-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    border-radius: 18px;
}

.compact-card .poster-wrap {
    aspect-ratio: 2 / 3;
    height: 136px;
}

.compact-card .poster-badge,
.compact-card .tag-line,
.compact-card .movie-card-body p {
    display: none;
}

.compact-card .movie-card-body {
    min-height: auto;
    padding: 12px 12px 12px 0;
}

.compact-card h3 {
    font-size: 15px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), #000);
    padding: 42px 0;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #fbbf24;
    font-size: 24px;
    font-weight: 900;
}

.footer-inner p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links,
.footer-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-content: start;
}

.footer-links a,
.footer-cats a {
    color: #cbd5e1;
}

.footer-links a:hover,
.footer-cats a:hover {
    color: #fbbf24;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .movie-grid,
    .catalog-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .main-nav {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .top-search {
        display: none;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        left: 24px;
        width: calc(100% - 48px);
    }

    .search-panel,
    .rank-layout,
    .footer-inner,
    .detail-intro {
        grid-template-columns: 1fr;
    }

    .large-search,
    .inline-filter {
        flex-direction: column;
    }

    .podium-grid,
    .movie-grid,
    .catalog-grid,
    .category-grid,
    .small-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-poster {
        width: min(280px, 100%);
    }

    .ranking-item {
        grid-template-columns: 46px 68px 1fr;
    }

    .ranking-item strong {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 18px;
    }

    .quick-nav {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        min-height: 580px;
    }

    .hero-arrow {
        display: none;
    }

    .hero p,
    .page-hero p,
    .detail-intro p {
        font-size: 15px;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .catalog-grid,
    .category-grid,
    .small-grid,
    .podium-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-body {
        min-height: auto;
    }

    .compact-card {
        grid-template-columns: 88px 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}
