:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(30, 41, 59, 0.88);
    --line: rgba(148, 163, 184, 0.20);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #f59e0b;
    --accent-2: #fb923c;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: white;
    background: rgba(245, 158, 11, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: white;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.16) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.86) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    max-width: 1180px;
}

.hero-content > * {
    max-width: 680px;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    margin: 0 0 16px;
    border-radius: 999px;
    color: white;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content h2 {
    font-size: clamp(30px, 4.4vw, 58px);
}

.hero-content p {
    margin: 0 0 20px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 15px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.button-primary,
.button-secondary,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.button-primary {
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.25);
}

.button-secondary,
.section-link {
    color: white;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.button-primary:hover,
.button-secondary:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.60);
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 30px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: var(--accent);
}

.page-container,
.page-main > .sub-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.page-main {
    padding: 42px 0 0;
}

.sub-hero,
.detail-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    min-height: 300px;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.20), transparent 24rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.82));
    box-shadow: var(--shadow);
}

.sub-hero h1,
.detail-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.sub-hero p,
.detail-one-line {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.sub-hero.with-cover {
    grid-template-columns: minmax(0, 1fr) 280px;
}

.sub-hero.with-cover img {
    width: 280px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.filter-panel,
.section-block {
    margin: 34px 0 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 24px;
    align-items: end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.filter-panel h2,
.section-heading h2,
.detail-copy h2,
.detail-side-card h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.filter-controls {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    outline: 0;
    background: rgba(2, 6, 23, 0.70);
}

.filter-controls input::placeholder {
    color: #94a3b8;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(30, 41, 59, 0.86);
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
}

.movie-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.90);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--subtle);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-list span {
    padding: 5px 8px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    color: #fde68a;
    font-size: 12px;
    background: rgba(245, 158, 11, 0.10);
}

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

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-card img,
.category-overview-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card div,
.category-overview-card > div {
    padding: 22px;
}

.category-card span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.category-card h3,
.category-overview-card h2 {
    margin: 8px 0 12px;
    font-size: 25px;
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-preview-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.category-preview-links a {
    color: #fde68a;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.full-ranking {
    grid-template-columns: 1fr;
}

.ranking-row {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr) minmax(160px, 0.8fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    transition: transform 0.2s ease, border 0.2s ease;
}

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

.ranking-number {
    color: var(--accent);
    font-weight: 900;
    font-size: 18px;
    text-align: center;
}

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

.ranking-title {
    min-width: 0;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-info {
    color: var(--subtle);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-hero {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: stretch;
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--subtle);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.detail-one-line {
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
}

.detail-tags {
    margin: 8px 0 26px;
}

.player-section {
    margin: 34px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: rgba(2, 6, 23, 0.34);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    font-size: 34px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 54px rgba(245, 158, 11, 0.38);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.detail-copy,
.detail-side-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.detail-copy p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.95;
}

.review-kicker {
    margin-top: 28px;
}

.detail-side-card dl {
    display: grid;
    gap: 14px;
    margin: 22px 0;
}

.detail-side-card dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-side-card dt {
    color: var(--subtle);
}

.detail-side-card dd {
    margin: 0;
    color: white;
}

.full-width {
    width: 100%;
}

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

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

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

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p {
    color: var(--subtle);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    color: var(--subtle);
    border-top: 1px solid var(--line);
    text-align: center;
}

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

    .filter-panel,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .category-overview-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .page-main {
        padding-top: 24px;
    }

    .sub-hero,
    .sub-hero.with-cover,
    .detail-hero,
    .category-card,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .sub-hero,
    .detail-hero {
        padding: 24px;
    }

    .sub-hero.with-cover img,
    .detail-poster img {
        width: 100%;
        min-height: auto;
        aspect-ratio: 16 / 10;
    }

    .filter-controls,
    .movie-grid,
    .movie-grid.large-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 38px 52px minmax(0, 1fr);
    }

    .ranking-info {
        grid-column: 3;
    }
}
