:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-deep: #0f172a;
    --bg-soft: rgba(15, 23, 42, 0.72);
    --card: rgba(30, 41, 59, 0.86);
    --card-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --amber: #f59e0b;
    --amber-deep: #d97706;
    --blue: #1d4ed8;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.34), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.18), transparent 24%),
        linear-gradient(180deg, #020617 0%, #082f49 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px);
}

.nav-shell {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    font-size: 14px;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    color: #e2e8f0;
}

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

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

.mobile-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(15, 23, 42, 0.62);
    border-radius: 12px;
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 0 20px;
}

.hero {
    position: relative;
    height: min(760px, 74vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 44%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 86px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.hero-title-text {
    margin: 0;
    max-width: 840px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero h2 {
    margin-top: 16px;
    font-size: clamp(28px, 4vw, 52px);
    color: #fde68a;
}

.hero-desc {
    max-width: 720px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

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

.hero-tags span:first-child,
.detail-meta span:first-child {
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    border-color: transparent;
}

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

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

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.secondary-btn {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.page-main {
    padding: 52px 0 32px;
}

.inner-page {
    min-height: 64vh;
}

.content-section {
    margin-bottom: 58px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

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

.section-title span {
    color: var(--amber);
    font-size: 24px;
}

.section-title a {
    margin-left: auto;
    color: #fbbf24;
    font-weight: 700;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 42px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.search-box {
    width: min(420px, 100%);
    display: grid;
    gap: 8px;
    color: #fbbf24;
    font-weight: 700;
}

.wide-search {
    width: 100%;
}

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

.search-box input:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.sticky-filter {
    align-items: stretch;
    flex-direction: column;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-row button {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.86);
    padding: 8px 14px;
    cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    border-color: transparent;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 15px 38px rgba(0, 0, 0, 0.26);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 56%);
}

.year-badge,
.play-float {
    position: absolute;
    z-index: 2;
}

.year-badge {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 9px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.66);
}

.play-float {
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    border-radius: 999px;
    background: var(--amber);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
    min-height: 44px;
    margin: 0 0 9px;
    color: #fff;
    font-size: 15px;
    line-height: 1.45;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: #fbbf24;
}

.movie-card p {
    min-height: 42px;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    justify-content: space-between;
    color: #94a3b8;
    font-size: 12px;
}

.movie-meta span:last-child {
    max-width: 64%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-row {
    margin-top: 10px;
    color: #fbbf24;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.category-card {
    min-height: 192px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
    border: 1px solid var(--line);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.44);
}

.category-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.category-card h2 {
    margin: 0;
    color: #fbbf24;
    font-size: 22px;
}

.category-card-head span {
    color: #e2e8f0;
    font-size: 13px;
}

.category-card p {
    margin: 14px 0 16px;
    color: #cbd5e1;
    line-height: 1.7;
}

.category-samples {
    display: grid;
    gap: 8px;
}

.category-samples a {
    color: #e2e8f0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-samples a:hover {
    color: #fbbf24;
}

.two-column-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 26px;
    align-items: start;
}

.rank-panel,
.detail-side,
.detail-article,
.page-hero,
.player-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 54px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.66);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.34);
}

.rank-item img {
    width: 54px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-num,
.rank-dot {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
}

.rank-text {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-text strong {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text em {
    overflow: hidden;
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.heat-chip {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fde68a;
    font-size: 12px;
    background: rgba(245, 158, 11, 0.12);
}

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

.page-hero {
    padding: 34px;
    margin-bottom: 30px;
    background:
        linear-gradient(135deg, rgba(30, 64, 175, 0.5), rgba(15, 23, 42, 0.9)),
        radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.24), transparent 34%);
}

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

.page-hero p:last-child {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.player-card {
    overflow: hidden;
    margin-bottom: 28px;
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.08));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-layer span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 36px;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.34);
}

.player-card.is-playing .play-layer {
    opacity: 0;
    pointer-events: none;
}

.detail-info {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 28px;
}

.detail-cover img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

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

.lead-text {
    margin: 22px 0 0;
    color: #fef3c7;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.88);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 46px;
}

.detail-article {
    padding: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: #fbbf24;
}

.detail-article p {
    margin: 0 0 24px;
    color: #dbeafe;
    line-height: 2;
    font-size: 17px;
}

.detail-side {
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 22px;
}

.detail-side a {
    padding: 13px;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.7);
}

.detail-side a:hover {
    color: #fbbf24;
}

.site-footer {
    margin-top: 50px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.98));
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 42px;
    padding: 46px 0;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: #cbd5e1;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    padding: 18px 0 24px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid var(--line);
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .desktop-nav {
        gap: 12px;
        font-size: 14px;
    }

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

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

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

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

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

    .hero {
        height: 72vh;
        min-height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

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

    .category-grid,
    .wide-grid,
    .big-rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .heat-chip {
        display: none;
    }
}

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

    .site-logo {
        font-size: 20px;
    }

    .hero h1,
    .hero h2,
    .hero-title-text {
        font-size: 34px;
    }

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

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .secondary-btn {
        flex: 1 1 100%;
    }

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

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

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

    .page-hero,
    .search-panel,
    .detail-article,
    .detail-side {
        padding: 20px;
        border-radius: 18px;
    }

    .detail-info {
        padding: 20px;
    }
}
