:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(96, 165, 250, 0.24);
    --border-strong: rgba(34, 211, 238, 0.48);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #2563eb;
    --yellow: #facc15;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
}

* {
    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 28rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #082f49 48%, #020617 100%);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--cyan);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(37, 99, 235, 0.92));
    color: white;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--soft);
    font-weight: 700;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-menu a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover {
    color: var(--cyan);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.header-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    padding: 10px 15px;
    outline: none;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.header-search button,
.primary-button,
.secondary-button,
.hero-arrow,
.hero-dot,
.nav-toggle,
.player-overlay,
.filter-panel button {
    cursor: pointer;
}

.header-search button,
.primary-button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    padding: 10px 18px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.32);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    color: var(--soft);
    padding: 10px 18px;
    font-weight: 800;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    padding: 8px 11px;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    padding: 12px 0 18px;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu nav {
    display: grid;
    gap: 12px;
    color: var(--soft);
    font-weight: 700;
}

main {
    flex: 1;
}

.hero-section {
    padding: 32px 0 26px;
}

.hero-slider {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

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

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 42%);
}

.hero-content {
    position: absolute;
    left: clamp(22px, 6vw, 72px);
    right: clamp(22px, 42vw, 520px);
    bottom: clamp(34px, 8vw, 78px);
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    background: rgba(34, 211, 238, 0.14);
    color: var(--cyan);
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 900;
}

.badge.gold {
    border-color: rgba(250, 204, 21, 0.34);
    background: rgba(250, 204, 21, 0.14);
    color: var(--yellow);
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 14px;
    line-height: 1.08;
}

.hero-content h1 {
    font-size: clamp(38px, 6vw, 72px);
    letter-spacing: -0.04em;
}

.hero-content h2 {
    font-size: clamp(28px, 4vw, 52px);
}

.gradient-text {
    background: linear-gradient(135deg, #67e8f9, #60a5fa, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    color: var(--soft);
    font-size: clamp(16px, 1.7vw, 20px);
    max-width: 720px;
    margin: 0 0 22px;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.46);
    color: white;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-arrow:hover {
    border-color: rgba(34, 211, 238, 0.54);
    background: rgba(8, 47, 73, 0.66);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(16px);
}

.search-panel,
.filter-panel {
    margin: 22px 0 34px;
    padding: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 160px 160px;
    gap: 12px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.48);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
}

.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 42px;
}

.quick-categories a {
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    color: var(--soft);
    padding: 9px 14px;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.quick-categories a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.48);
    transform: translateY(-2px);
}

.section-block {
    margin: 46px 0 62px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
}

.section-title span {
    display: inline-block;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-desc {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--border-strong);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.16);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
}

.poster-frame.wide {
    aspect-ratio: 16 / 9;
}

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

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

.poster-year,
.rank-number {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.92);
    color: #422006;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body p {
    min-height: 46px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

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

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-links a {
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--soft);
    padding: 4px 9px;
    font-size: 13px;
}

.page-hero {
    margin: 34px 0 26px;
    padding: 34px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.12)),
        rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.16;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--soft);
}

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

.rank-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
}

.rank-number {
    left: 10px;
    right: auto;
    background: rgba(34, 211, 238, 0.95);
    color: #083344;
}

.detail-wrap {
    padding: 34px 0 68px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: stretch;
    margin-bottom: 34px;
    padding: 22px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 450px;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.12;
}

.detail-lead {
    margin: 0 0 18px;
    color: var(--soft);
    font-size: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag-list span,
.tag-list a {
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(34, 211, 238, 0.1);
    color: var(--soft);
    padding: 5px 11px;
    font-size: 13px;
}

.player-section,
.story-section,
.related-section {
    margin-top: 34px;
    padding: 24px;
}

.player-section h2,
.story-section h2,
.related-section h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 35%),
        rgba(2, 6, 23, 0.36);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 34px;
    box-shadow: 0 22px 50px rgba(34, 211, 238, 0.34);
    padding-left: 5px;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.story-section p {
    margin: 0 0 18px;
    color: var(--soft);
    font-size: 16px;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding: 38px 0;
    color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 12px;
    color: var(--text);
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(96, 165, 250, 0.16);
    padding: 18px 0;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

[hidden] {
    display: none !important;
}

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

    .nav-toggle {
        display: inline-flex;
    }

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

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

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

@media (max-width: 820px) {
    .hero-slider {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-content {
        right: 22px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

    .detail-poster img {
        min-height: 0;
    }

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

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

    .logo {
        font-size: 20px;
    }

    .hero-section {
        padding-top: 18px;
    }

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

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

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

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

    .page-hero,
    .detail-hero,
    .player-section,
    .story-section,
    .related-section {
        padding: 18px;
    }
}
