:root {
    color-scheme: dark;
    --dark-900: #141618;
    --dark-850: #1a1d23;
    --dark-800: #24272c;
    --dark-700: #353940;
    --dark-650: #464c56;
    --text: #ffffff;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --primary: #1890ff;
    --primary-strong: #0878df;
    --secondary: #13c2c2;
    --gold: #f7c948;
    --danger: #f87171;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(24, 144, 255, 0.13), transparent 32rem), var(--dark-900);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

img.is-missing {
    opacity: 0;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(36, 39, 44, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.footer-brand span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    box-shadow: 0 0 32px rgba(24, 144, 255, 0.4);
}

.brand-copy strong {
    display: block;
    font-size: 22px;
    line-height: 1;
}

.brand-copy em {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    font-weight: 600;
    transition: color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #64b5ff;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-nav {
    display: none;
    padding: 0 20px 18px;
    background: rgba(36, 39, 44, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
}

.hero-carousel {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 22, 24, 0.96), rgba(20, 22, 24, 0.56), rgba(20, 22, 24, 0.16)), linear-gradient(0deg, var(--dark-900), rgba(20, 22, 24, 0.12) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 78vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    padding-top: 76px;
    max-width: 1180px;
}

.hero-kicker,
.section-kicker,
.detail-tags a,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(24, 144, 255, 0.5);
    background: rgba(24, 144, 255, 0.18);
    color: #91caff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin: 0;
}

.hero-content p {
    max-width: 680px;
    color: #d9dee7;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    margin: 0;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span {
    color: var(--soft);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.hero-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    color: var(--muted);
}

.hero-meta span:first-child,
.card-meta span:first-child {
    color: var(--gold);
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.search-form button,
.filter-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 0;
    padding: 13px 22px;
    color: #ffffff;
    font-weight: 800;
    background: var(--primary);
    box-shadow: 0 16px 40px rgba(24, 144, 255, 0.32);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn:hover,
.search-form button:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--primary-strong);
    box-shadow: 0 18px 48px rgba(24, 144, 255, 0.42);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 22, 24, 0.6);
    color: #ffffff;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.panel-section,
.content-section,
.page-main,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.panel-section {
    margin-top: -44px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(36, 39, 44, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel-section h2,
.section-head h2,
.page-hero h1,
.detail-card h1 {
    margin: 8px 0 0;
    color: #ffffff;
}

.search-form,
.filter-row {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-row input,
.filter-row select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(20, 22, 24, 0.72);
    color: #ffffff;
    padding: 13px 14px;
    outline: none;
}

.filter-row select {
    min-width: 130px;
}

.content-section {
    padding-top: 76px;
}

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

.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
}

.section-head a {
    color: #91caff;
    font-weight: 800;
}

.compact-head {
    align-items: center;
    margin-bottom: 18px;
}

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

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

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--dark-800);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    background: #2c3037;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.28), rgba(19, 194, 194, 0.14)), var(--dark-700);
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
    opacity: 0.82;
}

.card-badge,
.duration-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(24, 144, 255, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.duration-badge {
    left: auto;
    right: 12px;
    background: rgba(20, 22, 24, 0.85);
    color: #ffffff;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.86);
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 144, 255, 0.9);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card .card-body h3 {
    font-size: 16px;
}

.card-body h3 a:hover {
    color: #64b5ff;
}

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

.card-meta {
    gap: 10px;
    font-size: 13px;
}

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.16), rgba(19, 194, 194, 0.08)), var(--dark-800);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(24, 144, 255, 0.45);
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.24), rgba(19, 194, 194, 0.12)), #2c3037;
}

.category-tile strong {
    display: block;
    font-size: 22px;
}

.category-tile span {
    color: var(--soft);
    line-height: 1.55;
}

.category-tile em {
    color: #91caff;
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
}

.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.ranking-panel,
.filter-panel,
.category-block,
.detail-card,
.side-card,
.player-shell {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(36, 39, 44, 0.88);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.ranking-panel,
.filter-panel,
.category-block,
.detail-card,
.side-card {
    padding: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 40px 90px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(20, 22, 24, 0.48);
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    background: rgba(53, 57, 64, 0.82);
    transform: translateX(4px);
}

.rank-num {
    color: var(--gold);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.28), rgba(19, 194, 194, 0.14)), var(--dark-700);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    color: #ffffff;
    line-height: 1.35;
}

.rank-info em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-score {
    color: var(--gold);
    font-weight: 900;
}

.page-main {
    padding-top: 116px;
    padding-bottom: 30px;
}

.page-hero {
    margin-bottom: 34px;
    padding: 54px;
    border-radius: 26px;
    background: radial-gradient(circle at 20% 20%, rgba(24, 144, 255, 0.28), transparent 32rem), linear-gradient(135deg, rgba(36, 39, 44, 0.96), rgba(20, 22, 24, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

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

.page-hero p {
    max-width: 820px;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
    margin: 14px 0 0;
}

.page-category-grid {
    margin-bottom: 44px;
}

.category-block {
    margin-bottom: 28px;
}

.filter-panel {
    margin-bottom: 32px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px 160px;
    margin-bottom: 24px;
}

.category-hero .breadcrumb,
.detail-breadcrumb a {
    color: #91caff;
    font-weight: 700;
}

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

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

.searchable-item.is-hidden {
    display: none;
}

.large-rank-list .rank-row {
    grid-template-columns: 48px 130px 1fr 80px;
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 20px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
    gap: 26px;
}

.detail-primary {
    display: grid;
    gap: 24px;
}

.player-shell {
    overflow: hidden;
    padding: 0;
}

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

.site-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    background: rgba(24, 144, 255, 0.88);
    color: #ffffff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 42px rgba(24, 144, 255, 0.45);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.video-player.is-playing .big-play {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
}

.big-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.player-status {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    font-size: 13px;
}

.player-status.is-ready {
    color: #b7eb8f;
}

.player-status.is-error {
    color: #ffccc7;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 32px 18px 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.video-player:hover .player-controls,
.video-player:focus-within .player-controls {
    opacity: 1;
}

.player-controls button {
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 9px 13px;
    font-weight: 800;
}

.detail-card {
    display: grid;
    gap: 24px;
}

.detail-card h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}

.lead-text,
.detail-card p {
    color: var(--soft);
    font-size: 17px;
    line-height: 1.85;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-grid span {
    text-align: center;
}

.stats-grid strong,
.stats-grid em {
    display: block;
}

.stats-grid strong {
    color: #ffffff;
    font-size: 22px;
}

.stats-grid em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 20px;
}

.cover-card {
    overflow: hidden;
    padding: 0;
}

.cover-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.28), rgba(19, 194, 194, 0.14)), var(--dark-700);
    transition: transform 0.3s ease;
}

.cover-card div {
    padding: 20px;
}

.cover-card p {
    color: var(--muted);
    line-height: 1.6;
}

.info-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
    color: #ffffff;
}

.info-card a {
    color: #91caff;
}

.side-rank-list .rank-row {
    grid-template-columns: 70px 1fr;
}

.side-rank-list .rank-num,
.side-rank-list .rank-score {
    display: none;
}

.side-rank-list .rank-thumb {
    width: 70px;
}

.site-footer {
    margin-top: 86px;
    padding: 46px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

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

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

.site-footer a:hover {
    color: #91caff;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card,
.category-tile,
.ranking-panel,
.category-block,
.detail-card,
.side-card,
.page-hero {
    animation: fadeIn 0.5s ease both;
}

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

    .detail-layout,
    .two-column-section,
    .footer-grid,
    .panel-section {
        grid-template-columns: 1fr;
    }
}

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

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

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

    .header-inner {
        height: 68px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 82vh;
    }

    .hero-content {
        padding-top: 90px;
        padding-bottom: 80px;
    }

    .hero-arrow {
        display: none;
    }

    .panel-section {
        margin-top: -28px;
        padding: 20px;
    }

    .search-form,
    .filter-row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p,
    .card-meta {
        font-size: 12px;
    }

    .page-hero {
        padding: 34px 22px;
    }

    .large-rank-list .rank-row,
    .rank-row {
        grid-template-columns: 34px 82px 1fr;
    }

    .rank-score {
        display: none;
    }

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

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .category-movie-grid,
    .search-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        flex: 1;
    }
}
