* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #020617;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 32rem),
        radial-gradient(circle at 85% 8%, rgba(6, 182, 212, 0.16), transparent 28rem),
        linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    min-height: 100vh;
}

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-text strong {
    display: block;
    font-size: 23px;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 22px;
}

.hero-showcase {
    position: relative;
    min-height: 85vh;
    width: min(1600px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 34px;
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: 28px;
    align-items: stretch;
    overflow: hidden;
}

.hero-bg-orb {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.18;
    pointer-events: none;
}

.hero-bg-orb--one {
    left: -120px;
    top: 90px;
    background: var(--blue);
}

.hero-bg-orb--two {
    right: 8%;
    bottom: 40px;
    background: var(--cyan);
}

.hero-intro {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.hero-intro h1,
.page-hero h1,
.detail-main-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-intro p,
.page-hero p,
.detail-one-line {
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.hero-search {
    display: flex;
    gap: 10px;
    margin: 28px 0 20px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 16px;
    font-size: 16px;
    background: transparent;
}

.hero-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    box-shadow: none;
}

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

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(260px, 1fr));
    gap: 18px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #0f172a;
    isolation: isolate;
}

.hero-card--large {
    grid-column: span 2;
    grid-row: span 2;
}

.hero-card--tall {
    grid-row: span 1;
}

.hero-card--wide {
    grid-row: span 1;
}

.hero-card img,
.category-tile img,
.movie-poster img,
.detail-cover img,
.detail-backdrop img,
.category-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

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

.hero-card::after,
.category-tile::after,
.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.26), transparent);
    pointer-events: none;
}

.hero-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.34), transparent 26rem);
    z-index: 1;
}

.hero-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: clamp(22px, 4vw, 42px);
    color: #ffffff;
}

.hero-label,
.rank-badge,
.poster-cover-number {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fef3c7;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
}

.hero-card-content h2 {
    margin: 12px 0 12px;
    font-size: clamp(26px, 3.5vw, 48px);
    line-height: 1.05;
}

.hero-card-content p {
    max-width: 780px;
    color: #e2e8f0;
    line-height: 1.7;
}

.hero-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.hero-play,
.play-dot {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.hero-play {
    top: 50%;
    left: 50%;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
}

.stats-strip {
    width: min(1600px, calc(100% - 32px));
    margin: 0 auto 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stats-strip div {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.stats-strip strong {
    display: block;
    font-size: 34px;
}

.stats-strip span {
    color: var(--muted);
    font-weight: 700;
}

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

.content-section--nested {
    width: 100%;
    padding: 18px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 44px);
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.section-link,
.text-button {
    color: var(--blue);
    font-weight: 900;
}

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

.movie-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
}

.poster-cover-number {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    color: #ffffff;
}

.play-dot {
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: 180ms ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 16px;
}

.movie-meta-row,
.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.category-pill {
    color: var(--blue);
    font-weight: 900;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-info p {
    min-height: 62px;
    margin: 0 0 12px;
    color: #475569;
    line-height: 1.62;
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}

.tag-list--large span {
    padding: 8px 12px;
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border-radius: 26px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile span,
.category-tile strong,
.category-tile p {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    color: #ffffff;
}

.category-tile span {
    bottom: 92px;
    font-size: 25px;
    font-weight: 900;
}

.category-tile strong {
    bottom: 66px;
    color: #bae6fd;
}

.category-tile p {
    bottom: 20px;
    margin: 0;
    color: #e2e8f0;
    line-height: 1.55;
}

.page-hero {
    width: min(1600px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: clamp(34px, 7vw, 78px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.20), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(219, 234, 254, 0.72));
    box-shadow: var(--shadow);
}

.page-hero--small h1 {
    max-width: 900px;
}

.filter-panel {
    position: sticky;
    top: 92px;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.search-box,
.select-box {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.search-box input,
.select-box select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: #ffffff;
    outline: 0;
}

.category-overview-grid {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel-strong);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 190px;
    overflow: hidden;
    border-radius: 20px;
    background: #dbeafe;
}

.category-overview-card h2 {
    margin: 4px 0 12px;
    font-size: 30px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 64px;
    background: #020617;
    color: #ffffff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(5px);
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.96));
}

.breadcrumb,
.detail-layout,
.detail-content-grid {
    position: relative;
    z-index: 1;
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
    aspect-ratio: 2 / 3;
}

.detail-cover span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.62);
}

.detail-main-info p {
    color: #e2e8f0;
}

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

.detail-meta-grid div {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.detail-meta-grid span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 7px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 36px 0 70px;
}

.detail-article,
.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

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

.movie-player {
    width: 100%;
    min-height: 420px;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.56), rgba(37, 99, 235, 0.34));
}

.player-start span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.34);
    font-size: 34px;
}

.player-start strong {
    font-size: 24px;
}

.player-start.is-hidden {
    display: none;
}

.text-panel,
.sidebar-card {
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel-strong);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.text-panel h2,
.sidebar-card h2 {
    margin-top: 0;
}

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

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

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

.info-list dd {
    margin: 0;
}

.sidebar-rank-list {
    padding: 0;
    margin: 0 0 18px;
    list-style: none;
    display: grid;
    gap: 10px;
}

.sidebar-rank-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.sidebar-rank-list span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.sidebar-rank-list strong,
.sidebar-rank-list em {
    display: block;
}

.sidebar-rank-list strong {
    font-size: 14px;
}

.sidebar-rank-list em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.side-link {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    color: var(--blue);
    font-weight: 900;
}

.image-missing {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.24)),
        repeating-linear-gradient(45deg, #dbeafe, #dbeafe 12px, #eff6ff 12px, #eff6ff 24px);
}

.image-missing::after {
    content: attr(alt);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    width: min(1600px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    color: #475569;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 18px 0;
}

.footer-links a {
    color: var(--blue);
    font-weight: 800;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .hero-showcase,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: 620px;
    }

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

@media (max-width: 860px) {
    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
        justify-content: stretch;
    }

    .nav-link {
        width: 100%;
    }

    .hero-showcase {
        min-height: auto;
        padding-top: 22px;
    }

    .hero-intro {
        padding: 24px;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search input {
        min-height: 44px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        min-height: auto;
    }

    .hero-card,
    .hero-card--large,
    .hero-card--tall,
    .hero-card--wide {
        grid-column: auto;
        grid-row: auto;
        min-height: 360px;
    }

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

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

    .category-overview-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 280px;
    }

    .filter-panel {
        position: static;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .hero-showcase,
    .stats-strip,
    .content-section,
    .page-hero,
    .breadcrumb,
    .detail-layout,
    .detail-content-grid,
    .footer-inner {
        width: min(100% - 22px, 1600px);
    }

    .brand-text strong {
        font-size: 18px;
    }

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .movie-info p,
    .score-row,
    .movie-meta-row {
        font-size: 12px;
    }

    .text-panel p {
        font-size: 15px;
    }
}
