:root {
    --bg: #f8fafc;
    --bg-soft: #eef2f7;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-soft: #0f172a;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --card: #ffffff;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 36rem), var(--bg);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    max-width: 1280px;
    min-height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand__icon,
.footer-brand span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.brand__text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand__text small {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #e5e7eb;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #111827;
    background: var(--amber);
}

.header-search {
    display: flex;
    align-items: center;
    margin-left: auto;
    min-width: 320px;
    overflow: hidden;
    border-radius: 999px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-search input,
.mobile-search input,
.toolbar input,
.toolbar select {
    width: 100%;
    border: 0;
    outline: 0;
    font: inherit;
}

.header-search input,
.mobile-search input {
    color: #ffffff;
    background: transparent;
    padding: 11px 16px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #111827;
    background: var(--amber);
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: #1e293b;
    width: 44px;
    height: 44px;
    font-size: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 24px 22px;
    background: #0f172a;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav,
.mobile-panel__group {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel a {
    color: #e5e7eb;
    padding: 10px 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    color: #ffffff;
    background: #020617;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.36), transparent 30rem),
        radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.22), transparent 28rem),
        linear-gradient(135deg, #020617 0%, #111827 52%, #1e293b 100%);
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 24px 72px;
}

.hero__headline {
    max-width: 780px;
    margin-bottom: 36px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--amber);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(40px, 7vw, 76px);
    max-width: 980px;
}

.hero__headline p:last-child {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.8;
}

.hero-slider {
    position: relative;
    min-height: 420px;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(280px, 430px) 1fr;
    gap: 38px;
    align-items: center;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: 0.45s ease;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-slide__image {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    min-height: 420px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(15, 23, 42, 0.92));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-slide__image::after,
.detail-hero__poster::after,
.featured-card a::after,
.movie-card__poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent);
    pointer-events: none;
}

.hero-slide__image img {
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.hero-slide__content h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.hero-slide__content p {
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.8;
    max-width: 710px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.button--primary,
.button--small {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

.button--ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.button--text {
    color: #fbbf24;
}

.button--small {
    min-height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

.button:hover,
.section-link:hover,
.movie-card:hover h3 a,
.rank-card:hover h2 a {
    transform: translateY(-1px);
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.hero-controls > button {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #111827;
    background: #fbbf24;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 32px;
    border-radius: 999px;
    background: var(--amber);
}

.section {
    max-width: 1280px;
    margin: 70px auto;
    padding: 0 24px;
}

.section--raised {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

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

.section__head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-link {
    color: var(--amber-dark);
    font-weight: 800;
}

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

.category-tile,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-tile > a,
.category-overview-card__head {
    display: block;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.category-tile span,
.category-overview-card h2 {
    display: block;
    margin: 0 0 10px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-overview-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    font-weight: 400;
}

.category-tile__links,
.link-cloud,
.footer-rank {
    display: grid;
    gap: 10px;
    padding: 18px 22px 22px;
}

.category-tile__links a,
.link-cloud a,
.footer-rank a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #334155;
    font-size: 14px;
}

.category-tile__links em,
.link-cloud em,
.footer-rank em {
    flex: 0 0 auto;
    color: #94a3b8;
    font-style: normal;
}

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

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: 0.22s ease;
}

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

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

.movie-card__poster,
.rank-card__poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #475569);
}

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

.movie-card:hover img,
.rank-card:hover img,
.featured-card:hover img {
    transform: scale(1.06);
}

.movie-card__duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
}

.movie-card__body {
    padding: 15px;
}

.movie-card__meta,
.rank-card__meta,
.detail-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

.movie-card h3 a:hover,
.rank-card h2 a:hover {
    color: var(--amber-dark);
}

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #b45309;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

.tag-row--light span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ranking-panel__body {
    display: grid;
    grid-template-columns: minmax(280px, 440px) 1fr;
    gap: 24px;
}

.featured-card a {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 540px;
    padding: 28px;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.featured-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.featured-card span {
    color: #fbbf24;
    font-weight: 800;
}

.featured-card strong {
    margin-top: 8px;
    font-size: 34px;
    line-height: 1.1;
}

.featured-card p {
    color: #e2e8f0;
    line-height: 1.7;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: #fbbf24;
}

.rank-row__num {
    color: var(--amber-dark);
    font-size: 22px;
    font-weight: 900;
}

.rank-row__title {
    font-weight: 800;
}

.rank-row__meta {
    color: var(--muted);
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 34px auto 0;
    padding: 48px 24px;
}

.page-hero > div,
.detail-hero {
    border-radius: 30px;
    background: linear-gradient(135deg, #111827, #1e293b 55%, #0f172a);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero > div {
    padding: 54px;
    min-height: 240px;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 14px;
}

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

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.toolbar--wide {
    grid-template-columns: minmax(260px, 1fr) 190px 170px 170px;
}

.toolbar label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.toolbar input,
.toolbar select {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid var(--line);
}

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

.category-overview-card {
    padding-bottom: 18px;
}

.category-overview-card .button {
    margin-left: 22px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.rank-card__poster {
    aspect-ratio: auto;
    min-height: 178px;
}

.rank-card__poster span {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.rank-card__body {
    padding: 18px;
}

.rank-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.rank-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 34px;
    align-items: center;
    padding: 34px;
}

.detail-hero__poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    min-height: 520px;
    background: linear-gradient(135deg, #1e293b, #475569);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.detail-hero__poster img {
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.detail-hero h1 {
    font-size: clamp(34px, 6vw, 64px);
}

.detail-hero__content > p {
    max-width: 760px;
    color: #dbeafe;
    line-height: 1.85;
    font-size: 19px;
}

.detail-stats {
    margin-top: 24px;
}

.detail-stats span {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 8px 12px;
}

.player-section {
    margin-top: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: #111827;
    background: var(--amber);
    font-size: 34px;
    box-shadow: 0 18px 46px rgba(245, 158, 11, 0.35);
}

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

.play-cover.is-hidden,
.player-shell.playing .play-cover {
    display: none;
}

.detail-content article {
    padding: 34px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

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

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

.info-list div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

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

.site-footer {
    margin-top: 90px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    margin-bottom: 18px;
}

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 18px;
}

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

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
}

.footer-bottom span {
    margin-right: auto;
}

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

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

@media (max-width: 920px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
    }

    .hero__inner {
        padding-top: 52px;
    }

    .hero-slide,
    .detail-hero,
    .ranking-panel__body,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        gap: 24px;
    }

    .hero-slide__image {
        min-height: 360px;
    }

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

    .toolbar,
    .toolbar--wide {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero__poster,
    .detail-hero__poster img {
        min-height: 420px;
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .hero__inner,
    .section,
    .page-hero,
    .detail-hero,
    .site-footer__inner,
    .footer-bottom {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand__text strong {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero-slide__content h2,
    .page-hero h1,
    .detail-hero h1 {
        font-size: 34px;
    }

    .hero-slide,
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid--related,
    .rank-grid,
    .toolbar,
    .toolbar--wide,
    .info-list {
        grid-template-columns: 1fr;
    }

    .hero-slide__image {
        min-height: 300px;
        border-radius: 24px;
    }

    .page-hero > div {
        padding: 34px 22px;
    }

    .detail-hero {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .rank-card {
        grid-template-columns: 100px 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-row__meta {
        grid-column: 2;
    }

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