:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --accent-soft: #fffbeb;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, var(--bg), var(--bg-soft));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.32);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
}

.site-nav a {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent-strong);
    border-color: var(--accent);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: #fff7ed;
    border-radius: 14px;
    padding: 11px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--accent-strong);
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    height: 76vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.1));
}

.hero-content {
    position: absolute;
    left: max(7vw, 28px);
    bottom: 12vh;
    width: min(720px, calc(100% - 56px));
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.detail-tags {
    margin-top: 20px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    color: #92400e;
    background: #fef3c7;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.detail-tags span {
    color: #fffbeb;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.35);
    border-radius: 50%;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: var(--accent);
}

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

.section-overlap {
    position: relative;
    z-index: 7;
    margin-top: -70px;
}

.section-title,
.category-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-title h2,
.category-panel-head h2,
.filter-panel h2,
.detail-text h2 {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-title > a,
.category-panel-head > a,
.player-section .section-title > a {
    color: var(--accent-strong);
    font-weight: 900;
}

.section-title.light h2,
.section-title.light > a {
    color: #fff;
}

.featured-grid,
.movie-grid,
.category-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card,
.category-card,
.category-panel,
.filter-panel,
.detail-text {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.movie-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.card-year,
.card-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.card-year {
    top: 12px;
    right: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    padding: 4px 9px;
}

.card-play {
    left: 12px;
    bottom: 12px;
    color: #78350f;
    background: rgba(254, 243, 199, 0.92);
    padding: 5px 10px;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--accent-strong);
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.category-card,
.category-panel,
.filter-panel,
.detail-text {
    padding: 24px;
}

.category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
}

.category-head em {
    color: var(--accent-strong);
    font-size: 13px;
    font-style: normal;
}

.category-card p,
.category-panel p,
.filter-panel p {
    margin: 10px 0 18px;
    color: var(--muted);
}

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

.mini-card {
    position: relative;
    min-height: 72px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--dark);
}

.mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}

.mini-card span {
    position: absolute;
    inset: auto 8px 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 26px;
}

.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    height: 48px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    outline: none;
    padding: 0 16px;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.section-dark {
    width: 100%;
    max-width: none;
    padding: 76px max(calc((100% - 1180px) / 2), 16px);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 68px 110px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.08);
}

.rank-number {
    color: var(--accent-strong);
    font-size: 28px;
    font-weight: 950;
    text-align: center;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-content p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    padding: 0 16px;
}

.horizontal-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 24px;
    scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
    scroll-snap-align: start;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.26), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    padding: 90px max(calc((100% - 1180px) / 2), 16px);
}

.page-hero > div {
    width: min(760px, 100%);
}

.category-panels {
    display: grid;
    gap: 26px;
}

.category-panel-head {
    margin-bottom: 22px;
}

.category-panel-head .btn-ghost,
.category-panel-head .btn-primary {
    color: #fff;
}

.category-hero .btn-ghost,
.ranking-hero .btn-ghost {
    color: #fff;
}

.detail-hero {
    min-height: 640px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    filter: blur(4px) saturate(1.2);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.52));
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 78px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 36px;
}

.breadcrumbs a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
}

.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 30px;
    background: #1e293b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    justify-content: center;
    min-height: 46px;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    border-radius: 999px;
    font-weight: 900;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.detail-meta div {
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
    font-weight: 900;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 900;
}

.player-section {
    padding-bottom: 30px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.26), rgba(2, 6, 23, 0.74) 58%);
    text-align: center;
}

.player-stage.is-playing .player-cover {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.4);
}

.play-icon::before {
    content: "";
    display: block;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #fff;
}

.player-cover strong {
    max-width: min(680px, calc(100% - 48px));
    font-size: clamp(22px, 4vw, 38px);
    line-height: 1.2;
}

.detail-text {
    padding: 34px;
}

.detail-text h2 + p {
    margin-top: 12px;
}

.detail-text p {
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.detail-text h2:not(:first-child) {
    margin-top: 28px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    padding: 54px 0 28px;
}

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

.footer-logo {
    color: #fff;
}

.footer-inner p {
    max-width: 480px;
    margin: 14px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
    font-size: 14px;
    font-weight: 800;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 24px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    font-size: 14px;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 980px) {
    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 14px;
        box-shadow: var(--shadow-soft);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slider {
        height: 70vh;
        min-height: 520px;
    }

    .hero-content {
        left: 24px;
        bottom: 86px;
    }

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

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

    .filter-controls {
        grid-template-columns: 1fr;
    }

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

    .rank-action {
        grid-column: 2 / -1;
        width: max-content;
    }

    .detail-poster {
        max-width: 320px;
    }

    .detail-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .section,
    .detail-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .section {
        padding: 46px 0;
    }

    .section-title,
    .category-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .category-preview {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 44px 84px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-content p,
    .rank-meta {
        display: none;
    }

    .rank-content h3 {
        font-size: 16px;
    }

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

    .player-stage {
        border-radius: 18px;
    }
}
