:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f0fdfa;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --amber: #d97706;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    color: #fff;
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.25);
}

.brand-text {
    font-size: 21px;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #334155;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #ccfbf1;
    color: #0f766e;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f1f5f9;
    color: #0f172a;
}

.mobile-menu {
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: #fff;
}

.mobile-menu a {
    display: block;
    padding: 12px 8px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
}

.mobile-menu a:hover {
    background: #f1f5f9;
}

.hero {
    position: relative;
    padding: 46px 0 34px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.85), rgba(236, 254, 255, 0.62));
    pointer-events: none;
}

.hero-stage {
    position: relative;
    min-height: 560px;
    border-radius: 34px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
    gap: 0;
    padding: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.1)), var(--cover-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(34px, 6vw, 76px);
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #cffafe;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 22px 0 16px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 650px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn-primary,
.btn-ghost,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    color: #fff;
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.24);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-light:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: #fff;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

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

.hero-panel {
    position: relative;
    z-index: 2;
    align-self: center;
    justify-self: center;
    width: min(390px, 82%);
    margin-right: clamp(18px, 5vw, 70px);
    padding: 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.5);
}

.hero-panel-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 4px 2px;
    color: #fff;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: clamp(26px, 6vw, 76px);
    bottom: 32px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-arrow {
    width: 42px;
    height: 42px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.active {
    width: 34px;
    background: #22d3ee;
    opacity: 1;
}

.search-panel {
    position: relative;
    z-index: 3;
    margin-top: -22px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: var(--shadow);
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    background: #fff;
    color: var(--text);
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #2dd4bf;
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.search-results {
    display: none;
    margin-top: 12px;
    padding: 12px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-results.active {
    display: grid;
    gap: 8px;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.section {
    padding: 42px 0;
}

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

.section-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #0f766e;
    font-weight: 800;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.detail-title p {
    max-width: 760px;
    color: var(--muted);
}

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

.category-card {
    min-height: 154px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0e7490);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.mini-card:hover img {
    transform: scale(1.045);
}

.score-badge,
.rank-badge,
.detail-score {
    position: absolute;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.score-badge {
    right: 10px;
    bottom: 10px;
    padding: 6px 9px;
    color: #fde68a;
}

.rank-badge {
    left: 10px;
    top: 10px;
    padding: 6px 10px;
}

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

.movie-meta-line,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

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

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

.tag-row span,
.detail-tags span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
}

.horizontal-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.mini-card {
    min-width: 132px;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.mini-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mini-card span {
    display: block;
    padding: 10px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero {
    padding: 56px 0 30px;
    background: linear-gradient(135deg, #f0fdfa, #ecfeff 50%, #ffffff);
    border-bottom: 1px solid var(--line);
}

.page-title {
    max-width: 860px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    margin-bottom: 22px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-chip {
    border: 1px solid #99f6e4;
    cursor: pointer;
}

.filter-chip.active {
    background: #0f766e;
    color: #fff;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 96px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: #0f172a;
}

.rank-main h2,
.rank-main h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-main p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    color: #fff;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.52)), var(--cover-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 34px;
    align-items: end;
    padding: 58px 0 42px;
}

.detail-poster {
    position: relative;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-score {
    right: 16px;
    top: 16px;
    padding: 8px 12px;
    color: #fde68a;
}

.detail-title h1 {
    margin-bottom: 16px;
    color: #fff;
}

.detail-title p {
    color: #dbeafe;
    font-size: 18px;
}

.detail-meta {
    margin: 16px 0;
    color: #cbd5e1;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

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

.content-panel,
.side-panel,
.player-panel {
    border-radius: 26px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-panel,
.side-panel {
    padding: 24px;
}

.content-panel h2,
.side-panel h2,
.player-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-panel p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 16px;
}

.player-panel {
    overflow: hidden;
}

.player-panel h2 {
    padding: 20px 22px 0;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background-image: linear-gradient(rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72)), var(--cover-image);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.play-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    color: #fff;
}

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

.side-link {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: #f8fafc;
}

.side-link img {
    width: 72px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.side-link strong {
    display: block;
    margin-bottom: 4px;
}

.side-link span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 56px;
    padding: 34px 0;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.footer-grid p {
    max-width: 620px;
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
}

.footer-links a {
    color: #e0f2fe;
}

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

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

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

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

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-stage {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        align-self: end;
        justify-self: start;
        width: 210px;
        margin: 0 0 92px clamp(26px, 6vw, 76px);
    }

    .hero-controls {
        bottom: 24px;
    }

    .search-box,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .detail-hero-inner {
        grid-template-columns: 150px 1fr;
        align-items: center;
        gap: 18px;
    }

    .rank-item {
        grid-template-columns: 52px 76px 1fr;
    }

    .rank-item .btn-ghost {
        grid-column: 2 / -1;
    }

    .rank-item img {
        width: 76px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero {
        padding-top: 20px;
    }

    .hero-stage {
        border-radius: 24px;
        min-height: 650px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

    .hero-panel {
        width: 160px;
        border-radius: 22px;
        padding: 10px;
    }

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

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

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 32px;
    }

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

    .rank-item {
        grid-template-columns: 46px 1fr;
    }

    .rank-item img {
        display: none;
    }
}
