:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #08111f;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #e2e8f0;
    --white: #f8fafc;
    --cyan: #67e8f9;
    --cyan-strong: #22d3ee;
    --blue: #2563eb;
    --violet: #7c3aed;
    --orange: #f97316;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.48);
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.22), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(var(--max), calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue) 52%, var(--violet));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.2);
    color: white;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    justify-content: flex-end;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

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

.nav-search input,
.search-bar input,
.search-bar select {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    border-radius: 14px;
    outline: none;
    padding: 11px 13px;
}

.nav-search input {
    width: 220px;
}

.nav-search button,
.primary-btn,
.secondary-btn,
.card-action,
.search-bar button,
.player-layer,
.hero-dot,
.hero-arrow {
    border: 0;
    cursor: pointer;
}

.nav-search button,
.primary-btn,
.card-action,
.search-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-search button:hover,
.primary-btn:hover,
.card-action:hover,
.search-bar button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.28);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border-radius: 14px;
    color: #e0f2fe;
    border: 1px solid rgba(103, 232, 249, 0.35);
    background: rgba(8, 47, 73, 0.34);
    transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-btn:hover {
    transform: translateY(-2px);
    background: rgba(8, 47, 73, 0.58);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.72);
    padding: 9px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #e2e8f0;
}

.main-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    margin: 28px auto 70px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 34px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.72fr);
    gap: 34px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.01);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 26%, rgba(34, 211, 238, 0.24), transparent 24rem),
        linear-gradient(115deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.38) 100%);
    z-index: 1;
}

.hero-copy,
.hero-media {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px;
    padding: 7px 12px;
    border: 1px solid rgba(103, 232, 249, 0.26);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 47, 73, 0.3);
    font-size: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-actions,
.detail-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.hero-tags,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 26px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 116, 144, 0.24);
    border: 1px solid rgba(103, 232, 249, 0.16);
    font-size: 13px;
}

.hero-media {
    justify-self: end;
    width: min(360px, 100%);
    transform: rotate(2deg);
}

.hero-media img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(124, 58, 237, 0.22));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.hero-controls {
    position: absolute;
    left: 52px;
    right: 52px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-dots,
.hero-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.hero-dot {
    width: 34px;
    height: 6px;
    padding: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.34);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 54px;
    background: var(--cyan);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: white;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.section-block {
    margin: 70px 0;
}

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

.section-head h2,
.page-hero h1,
.content-panel h2,
.related-section h2 {
    color: var(--white);
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.movie-card p,
.content-panel p,
.rank-info p,
.empty-state {
    color: var(--muted);
}

.section-head p {
    margin: 8px 0 0;
    max-width: 700px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48));
    box-shadow: 0 20px 50px rgba(2, 8, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.32);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.38));
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.04);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-meta,
.rank-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-size: 13px;
}

.movie-meta span,
.rank-tags span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--white);
    font-size: 19px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 14px;
    font-size: 14px;
}

.card-action {
    width: 100%;
    margin-top: 14px;
}

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

.category-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 26px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 70% 10%, rgba(34, 211, 238, 0.2), transparent 13rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(103, 232, 249, 0.3);
}

.category-card h3 {
    margin: 0 0 10px;
    color: var(--white);
    font-size: 22px;
}

.category-card p {
    margin: 0 0 14px;
}

.category-card strong {
    color: var(--cyan);
}

.page-hero {
    margin: 38px 0 36px;
    padding: 42px;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 20rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.34));
    box-shadow: var(--shadow);
}

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

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
}

.search-panel {
    margin: 22px 0 32px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.62);
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px auto;
    gap: 12px;
}

.empty-state {
    display: none;
    padding: 26px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 20px;
}

.empty-state.active {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 58px minmax(0, 1fr) 92px;
    align-items: center;
    gap: 18px;
    padding: 12px 18px 12px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.65);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(103, 232, 249, 0.28);
}

.rank-cover img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.92);
}

.rank-index {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 900;
}

.rank-info h3 {
    margin: 0 0 5px;
    color: white;
}

.rank-info p {
    margin: 0 0 8px;
}

.rank-score {
    text-align: right;
}

.rank-score strong {
    display: block;
    color: var(--white);
    font-size: 26px;
}

.rank-score span {
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #bfdbfe;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.24), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.34));
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
    font-size: clamp(36px, 5vw, 68px);
}

.detail-copy .summary-line {
    max-width: 820px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.player-section,
.content-panel,
.related-section {
    margin: 36px 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.player-section {
    overflow: hidden;
}

.site-player {
    position: relative;
    background: #000;
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 14px;
    color: white;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.72)),
        rgba(2, 6, 23, 0.16);
}

.player-layer strong {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 22px 55px rgba(37, 99, 235, 0.34);
    font-size: 34px;
    padding-left: 6px;
}

.site-player.is-playing .player-layer {
    display: none;
}

.content-panel {
    padding: 30px;
}

.content-panel h2,
.related-section h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.content-panel p {
    margin: 0 0 24px;
    font-size: 17px;
}

.related-section {
    padding: 30px;
}

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

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    color: var(--muted);
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 14px;
}

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

.footer-links a:hover {
    color: white;
}

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

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

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

    .hero-media {
        justify-self: start;
        width: 260px;
    }

    .hero-slider {
        min-height: 860px;
    }

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

@media (max-width: 780px) {
    .nav-wrap {
        min-height: 66px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-panel {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 20px;
        border: 1px solid var(--line);
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .nav-panel.open {
        display: flex;
    }

    .nav-links,
    .nav-search {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-slider {
        min-height: 790px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
    }

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

    .hero-copy p {
        font-size: 16px;
    }

    .hero-controls {
        left: 26px;
        right: 26px;
        bottom: 24px;
    }

    .movie-grid,
    .related-section .movie-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

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

    .rank-row {
        grid-template-columns: 66px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-index,
    .rank-score {
        display: none;
    }

    .rank-cover img {
        width: 66px;
    }

    .page-hero {
        padding: 28px;
    }

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

@media (max-width: 520px) {
    .main-shell,
    .nav-wrap,
    .footer-inner {
        width: min(100% - 22px, var(--max));
    }

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

    .hero-slider {
        min-height: 820px;
        margin-top: 18px;
    }

    .hero-media {
        width: 220px;
    }

    .hero-dots {
        max-width: 160px;
        overflow: hidden;
    }

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