:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.84);
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(245, 158, 11, 0.28);
    --text: #f8fafc;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --amber-deep: #92400e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(146, 64, 14, 0.2), transparent 36%), #000;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.95));
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-light), var(--amber-deep));
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong,
.footer-brand strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--amber-light), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-light);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 24px 18px;
    background: rgba(2, 6, 23, 0.98);
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: blur(2px) saturate(1.1);
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(2, 6, 23, 0.76) 45%, rgba(0, 0, 0, 0.5)), linear-gradient(0deg, #000, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 380px;
    gap: 48px;
    align-items: center;
    padding: 64px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--amber-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: 18px;
}

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

.hero-tags,
.genre-row {
    margin-top: 24px;
}

.hero-tags span,
.genre-row span,
.tag-row span,
.tag-cloud a {
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 6px 10px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    font-size: 12px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 24px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.45);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img,
.detail-cover img,
.movie-card img,
.category-tile img,
.category-preview img {
    height: 100%;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.64);
    cursor: pointer;
    transform: translateY(-50%);
}

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

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

.top-search {
    margin-top: -42px;
    position: relative;
    z-index: 6;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.search-box span {
    color: var(--amber-light);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
}

.search-meta {
    min-width: 120px;
    color: var(--muted);
    text-align: right;
    font-size: 14px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

.content-section {
    padding: 64px 0;
}

.section-dark,
.ranking-band {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.94));
}

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

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
}

.section-title p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--amber-light);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.95));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #111827;
    background: var(--amber-light);
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--amber-light);
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    min-height: 42px;
}

.tag-row {
    margin-top: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    box-shadow: var(--shadow);
}

.category-tile img,
.tile-overlay {
    position: absolute;
    inset: 0;
}

.tile-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.16));
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile strong {
    font-size: 24px;
}

.category-tile small {
    margin-top: 8px;
    color: #d1d5db;
}

.seo-block {
    margin-bottom: 48px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 34px;
    background: rgba(15, 23, 42, 0.72);
}

.seo-block h2 {
    margin: 0 0 12px;
}

.seo-block p {
    color: #cbd5e1;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 38%), #020617;
}

.compact-hero .container,
.ranking-hero .container {
    padding: 86px 0 72px;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 32px 0 64px;
}

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

.breadcrumb a {
    color: var(--amber-light);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
}

.detail-meta div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.player-card {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
    box-shadow: var(--shadow);
}

.player-stage {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.player-stage video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-stage video {
    object-fit: contain;
    background: #000;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.12));
}

.player-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

.player-pulse {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, var(--amber));
    box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.14), 0 16px 40px rgba(0, 0, 0, 0.35);
    font-size: 34px;
    padding-left: 5px;
}

.detail-content {
    padding: 8px 0 24px;
}

.detail-article {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 34px;
    background: rgba(15, 23, 42, 0.74);
}

.detail-article h2 {
    margin: 28px 0 10px;
    font-size: 26px;
}

.detail-article h2:first-child {
    margin-top: 0;
}

.detail-article p {
    color: #d1d5db;
    font-size: 17px;
}

.tag-cloud {
    margin-top: 12px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.74);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 20px;
}

.category-preview img {
    aspect-ratio: 2 / 3;
}

.single-preview {
    display: block;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
}

.category-overview-card p {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #000);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-grid p,
.footer-bottom {
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 300px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 48px 0 86px;
    }

    .hero-poster {
        width: min(230px, 72vw);
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

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

    .search-meta {
        text-align: left;
    }

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

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

    .detail-cover {
        width: min(260px, 78vw);
    }

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

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

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

@media (max-width: 540px) {
    .header-inner {
        height: 64px;
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

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

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .movie-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

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

    .card-desc {
        display: none;
    }

    .tag-row {
        display: none;
    }

    .content-section {
        padding: 46px 0;
    }

    .detail-article {
        padding: 22px;
    }

    .player-card {
        border-radius: 22px;
        padding: 8px;
    }
}
