:root {
    color-scheme: dark;
    --bg: #0f172a;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(59, 130, 246, 0.22);
    --cyan: #22d3ee;
    --blue: #2563eb;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 32rem),
        linear-gradient(180deg, #0f172a 0%, #111827 46%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.9), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #22d3ee);
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

.logo-name {
    font-size: 22px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.header-search {
    flex: 1;
    max-width: 520px;
    position: relative;
}

.search-input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input {
    padding: 12px 18px 12px 44px;
}

.header-search::before {
    content: "⌕";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 22px;
}

.search-input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
    background: rgba(15, 23, 42, 0.82);
}

.nav-links,
.nav-cats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a,
.nav-cats a,
.pill-link {
    border-radius: 999px;
    color: var(--soft);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a {
    padding: 10px 12px;
    white-space: nowrap;
}

.nav-cats {
    padding: 0 0 14px;
}

.nav-cats a,
.pill-link {
    padding: 7px 14px;
    font-size: 14px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.nav-links a:hover,
.nav-cats a:hover,
.pill-link:hover {
    background: rgba(37, 99, 235, 0.28);
    color: var(--cyan);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: rgba(30, 41, 59, 0.75);
    font-size: 24px;
}

.mobile-panel {
    display: none;
    padding: 0 0 16px;
}

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

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.12) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.0) 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 610px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 92px 24px 84px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(37, 99, 235, 0.82);
    border: 1px solid rgba(125, 211, 252, 0.34);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.48);
}

.hero p {
    max-width: 640px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.34);
    background: rgba(15, 23, 42, 0.72);
    color: white;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.26);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 72px;
}

.section {
    margin-top: 42px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.17);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(30, 41, 59, 0.92);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(34, 211, 238, 0.12));
}

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

.card:hover .card-poster img {
    transform: scale(1.08);
}

.card-year,
.rank-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    color: white;
    background: rgba(0, 0, 0, 0.76);
}

.card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

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

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

.card-line {
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.meta-chip,
.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.22);
    font-size: 12px;
}

.tag-chip {
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.16);
    border-color: rgba(34, 211, 238, 0.22);
}

.category-panel,
.filter-panel,
.detail-panel,
.rank-item,
.player-shell,
.info-card {
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-panel {
    padding: 26px;
}

.filter-panel {
    padding: 18px;
    margin-bottom: 26px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 210px 210px;
    gap: 14px;
}

.filter-input,
.filter-select {
    min-height: 44px;
    padding: 0 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 16px;
    padding: 12px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-cover {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgba(15, 23, 42, 0.7);
}

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

.rank-content h3 {
    margin: 4px 0 8px;
    font-size: 18px;
}

.rank-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.breadcrumb {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.player-shell {
    overflow: hidden;
    background: #000;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
    color: white;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.66;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 16px 46px rgba(37, 99, 235, 0.38);
    font-size: 32px;
}

.player-frame.is-playing .player-cover {
    display: none;
}

.detail-panel {
    padding: 28px;
    margin-top: 24px;
}

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

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

.detail-text {
    color: var(--soft);
    line-height: 2;
    font-size: 16px;
}

.side-cover {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.74);
}

.side-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.info-card {
    margin-top: 18px;
    padding: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    color: var(--soft);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

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

.footer {
    border-top: 1px solid rgba(59, 130, 246, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), #020617);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 26px;
    color: var(--muted);
}

.footer h3 {
    margin: 0 0 12px;
    color: white;
}

.footer p,
.footer a {
    color: var(--muted);
    line-height: 1.8;
}

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

.backtop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
    cursor: pointer;
}

.empty-note {
    display: none;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 20px;
}

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

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

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

    .side-cover img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 820px) {
    .header-top {
        min-height: 66px;
    }

    .header-search,
    .nav-links,
    .nav-cats {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .mobile-panel .header-search,
    .mobile-panel .nav-links,
    .mobile-panel .nav-cats {
        display: flex;
        width: 100%;
        max-width: none;
    }

    .mobile-panel .nav-links,
    .mobile-panel .nav-cats {
        align-items: stretch;
        flex-direction: column;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 64px;
    }

    .grid,
    .grid-three,
    .grid-two,
    .rank-list {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 540px) {
    .header-inner,
    .main,
    .hero-content,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo-name {
        font-size: 18px;
    }

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

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

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