:root {
    color-scheme: light;
    --bg: #fff7ed;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --ink: #171717;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.18);
    --rose: #f43f5e;
    --orange: #f97316;
    --amber: #f59e0b;
    --gold: #fbbf24;
    --cyan: #06b6d4;
    --shadow: 0 24px 80px rgba(127, 29, 29, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.35), transparent 32rem),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.22), transparent 28rem),
        linear-gradient(180deg, #fff7ed 0%, #fff 40%, #fff1f2 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(22px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(251, 146, 60, 0.14);
}

.nav-shell {
    max-width: 1220px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange), var(--gold));
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.25);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.mobile-panel a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 280px;
    border: 1px solid rgba(244, 63, 94, 0.16);
    background: #fff;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 12px 38px rgba(249, 115, 22, 0.08);
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 12px 10px 16px;
    background: transparent;
}

.nav-search button,
.search-band button,
.filter-panel button {
    border: 0;
    padding: 10px 18px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #111827;
    border-radius: 999px;
}

.mobile-panel {
    padding: 0 22px 18px;
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 620px;
    height: min(78vh, 720px);
    overflow: hidden;
    background: linear-gradient(135deg, var(--rose), var(--orange), var(--amber));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.75), rgba(245, 158, 11, 0.45)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 24rem);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.44) 45%, rgba(0, 0, 0, 0.05) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    margin: 0 auto;
    height: 100%;
    padding: 120px 22px 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.hero-kicker,
.kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.96), rgba(249, 115, 22, 0.92));
    box-shadow: 0 14px 32px rgba(244, 63, 94, 0.22);
}

.hero h1 {
    margin: 20px 0 18px;
    max-width: 800px;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.tag,
.card-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
}

.hero-actions,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 16px 34px rgba(244, 63, 94, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-tools {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    transform: translateX(-50%);
    width: min(1220px, calc(100% - 44px));
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
}

.hero-thumb,
.hero-arrow {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.hero-thumb {
    min-width: 150px;
    padding: 12px 14px;
    border-radius: 16px;
    text-align: left;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-thumb.is-active {
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.hero-arrow {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
}

.search-band,
.content-section,
.page-hero,
.detail-hero,
.player-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 44px 22px;
}

.search-band {
    margin-top: -48px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 0.95fr 1.2fr;
    gap: 22px;
    align-items: center;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.page-hero h1,
.detail-intro h1,
.side-rank h2,
.detail-content h2 {
    margin: 12px 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.search-band form,
.filter-panel {
    display: flex;
    gap: 10px;
    border-radius: 24px;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(244, 63, 94, 0.14);
}

.search-band input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 0;
    outline: 0;
    border-radius: 18px;
    padding: 0 16px;
    background: #fff7ed;
}

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

.section-head p,
.page-hero p,
.search-band p,
.category-tile p,
.category-overview-card p,
.detail-content p,
.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-link {
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--rose);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(127, 29, 29, 0.08);
}

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

.movie-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 52px rgba(127, 29, 29, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
    box-shadow: 0 24px 64px rgba(244, 63, 94, 0.16);
}

.card-link {
    display: grid;
    height: 100%;
}

.poster {
    position: relative;
    overflow: hidden;
    margin: 0;
    min-height: 270px;
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    color: #fff;
    text-align: center;
    font-weight: 900;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.96), rgba(249, 115, 22, 0.86), rgba(251, 191, 36, 0.8)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.26), transparent 12rem);
}

.poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.poster span {
    position: relative;
    z-index: 1;
    line-height: 1.35;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.card-body p {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.card-tags .tag,
.detail-tags .tag {
    color: #be123c;
    background: #fff1f2;
}

.card-category {
    color: #9a3412;
    background: #ffedd5;
}

.rank-mark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.24);
}

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

.category-tile,
.category-overview-card a {
    min-height: 100%;
    display: grid;
    gap: 14px;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 14px;
    border: 1px solid rgba(244, 63, 94, 0.09);
    box-shadow: 0 18px 52px rgba(127, 29, 29, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.tile-poster {
    min-height: 150px;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
}

.category-tile span,
.category-overview-card span {
    color: var(--rose);
    font-weight: 900;
    font-size: 13px;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 4px 0 8px;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.side-rank {
    position: sticky;
    top: 100px;
    align-self: start;
    border-radius: var(--radius-lg);
    padding: 22px;
    background: #111827;
    color: #fff;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
}

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

.rank-list a {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-list strong {
    color: var(--gold);
}

.rank-list em {
    color: rgba(255, 255, 255, 0.56);
    font-style: normal;
}

.page-hero,
.detail-hero {
    padding-top: 74px;
}

.compact-hero {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumbs a {
    color: #be123c;
}

.category-overview-card ul {
    margin: 16px 0;
    padding-left: 18px;
    color: #4b5563;
    line-height: 1.9;
}

.ranking-table {
    display: grid;
    gap: 10px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 50px 64px minmax(0, 1fr) 90px 120px 140px;
    gap: 14px;
    align-items: center;
    min-height: 82px;
    padding: 10px 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(127, 29, 29, 0.06);
}

.rank-poster {
    min-height: 64px;
    width: 64px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    padding: 8px;
    font-size: 12px;
}

.ranking-row strong {
    color: var(--rose);
    font-size: 22px;
}

.ranking-title {
    font-weight: 900;
}

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

.detail-poster {
    border-radius: var(--radius-lg);
    min-height: 440px;
    box-shadow: var(--shadow);
}

.detail-intro .lead {
    max-width: 760px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta div {
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(244, 63, 94, 0.09);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-meta dd {
    margin: 6px 0 0;
    font-weight: 900;
}

.detail-tags {
    margin: 22px 0;
}

.player-section {
    padding-top: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.25);
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(244, 63, 94, 0.28), transparent 18rem),
        rgba(0, 0, 0, 0.2);
}

.player-start span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 22px 48px rgba(244, 63, 94, 0.38);
}

.player-start span::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #fff;
}

.player-shell.is-playing .player-start {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-content article {
    padding: 26px;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 18px 52px rgba(127, 29, 29, 0.08);
}

.site-footer {
    margin-top: 40px;
    background: #111827;
    color: #fff;
}

.footer-shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 40px 22px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

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

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

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .side-rank {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .hero {
        min-height: 680px;
    }

    .hero-content {
        padding: 100px 18px 160px;
    }

    .hero-tools {
        bottom: 22px;
        width: calc(100% - 24px);
    }

    .search-band {
        grid-template-columns: 1fr;
        margin-left: 12px;
        margin-right: 12px;
    }

    .search-band form,
    .filter-panel {
        flex-direction: column;
    }

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

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

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

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

    .ranking-row {
        grid-template-columns: 38px 52px 1fr;
    }

    .ranking-row span:nth-last-child(-n+3) {
        display: none;
    }

    .footer-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .movie-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .poster {
        min-height: 360px;
    }

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

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