:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --cyan-glow: rgba(34, 211, 238, 0.28);
    --amber: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% -8%, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at 88% 8%, rgba(14, 165, 233, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.56), transparent);
    transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.site-header.is-scrolled {
    background: rgba(2, 6, 23, 0.93);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-radius: 14px;
    box-shadow: 0 0 28px var(--cyan-glow);
    font-size: 16px;
    font-weight: 900;
}

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

.brand-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 16px;
    color: var(--soft);
    border-radius: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #e0fbff;
    background: rgba(34, 211, 238, 0.14);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.16)),
        linear-gradient(0deg, #020617 2%, rgba(2, 6, 23, 0.35) 44%, rgba(2, 6, 23, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 140px 0 72px;
}

.hero-label,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-title {
    max-width: 780px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 700px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.movie-meta,
.detail-meta,
.inline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.inline-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #042f3d;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 12px 32px var(--cyan-glow);
}

.btn-secondary,
.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.66);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    cursor: pointer;
    backdrop-filter: blur(14px);
}

.hero-control:hover {
    background: rgba(34, 211, 238, 0.18);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: var(--cyan);
}

main {
    min-height: 70vh;
}

.page-offset {
    padding-top: 116px;
}

.section-block {
    padding: 58px 0;
}

.section-panel {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.68));
    box-shadow: var(--shadow);
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
    display: block;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(15, 23, 42, 0.86));
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.score-badge {
    right: 10px;
    color: #1a1000;
    background: linear-gradient(135deg, var(--amber), #fde68a);
}

.rank-badge {
    left: 10px;
    color: #05202a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

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

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-small h2 {
    font-size: 16px;
}

.movie-card h2 a:hover {
    color: var(--cyan);
}

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

.movie-meta {
    gap: 8px;
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.5);
}

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

.tag-row span {
    padding: 4px 8px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.12);
    border-radius: 999px;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 65%);
}

.category-card h2 {
    position: relative;
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card p {
    position: relative;
    margin: 0 0 22px;
    color: var(--muted);
}

.rank-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(14, 165, 233, 0.12);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #05202a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-radius: 12px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-type {
    color: var(--muted);
    font-size: 13px;
}

.rank-score {
    color: var(--amber);
    font-weight: 900;
    text-align: right;
}

.search-shell {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
}

.search-shell input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
}

.search-shell input:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.search-hint {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.no-result {
    display: none;
    padding: 32px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.no-result.is-visible {
    display: block;
}

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

.breadcrumbs a:hover {
    color: var(--cyan);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 30px;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 24px;
    background: #000;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--text);
    border: 0;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.58));
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    color: #05202a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-radius: 999px;
    box-shadow: 0 0 44px var(--cyan-glow);
    font-size: 28px;
}

.detail-title {
    margin: 26px 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-card,
.info-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.detail-card h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    margin: 0 0 20px;
    color: var(--soft);
}

.info-card {
    position: sticky;
    top: 100px;
}

.info-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    margin-bottom: 18px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.8);
}

.info-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-table {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.info-table div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-table span:first-child {
    color: var(--muted);
}

.info-table span:last-child {
    text-align: right;
    font-weight: 800;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.52), rgba(2, 6, 23, 0.98));
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 40px;
    padding: 42px 0;
}

.footer-logo {
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.footer-brand p {
    max-width: 560px;
    color: var(--muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.footer-links h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.footer-links a {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

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

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

    .info-card {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-content {
        padding-top: 118px;
        padding-bottom: 76px;
    }

    .hero-control {
        display: none;
    }

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

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

    .rank-row {
        grid-template-columns: 42px minmax(0, 1fr) 50px;
    }

    .rank-type {
        display: none;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .footer-inner,
    .container,
    .hero-content,
    .mobile-nav,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .brand-subtitle {
        display: none;
    }

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

    .hero-title {
        font-size: 38px;
    }

    .hero-text {
        font-size: 16px;
    }

    .section-panel,
    .detail-card,
    .info-card {
        padding: 20px;
        border-radius: 20px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        gap: 12px;
    }

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

    .movie-card h2 {
        font-size: 15px;
    }

    .movie-card p,
    .tag-row {
        display: none;
    }

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