:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --radius-lg: 24px;
    --radius-md: 18px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.84);
    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;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 15px;
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.35);
}

.logo-text {
    font-size: 20px;
    color: white;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--muted-strong);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: rgba(148, 163, 184, 0.16);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.82);
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--bg-deep);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 112px 24px 96px;
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade,
.page-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.4) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, #0f172a 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 850px;
    margin: 16px 0 18px;
    color: white;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-content h2 + h2 {
    margin-top: -6px;
    font-size: clamp(28px, 4vw, 52px);
    color: var(--accent);
}

.hero-content p {
    max-width: 700px;
    margin: 0 0 30px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 23px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: white;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.primary-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.ghost-button {
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.42);
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.52);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-category-pills {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-category-pills a {
    padding: 10px 14px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    color: #e2e8f0;
    font-size: 14px;
}

.hero-category-pills a:hover {
    color: var(--accent);
    border-color: rgba(245, 158, 11, 0.48);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 36px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.4);
    cursor: pointer;
}

.hero-dot.active {
    width: 28px;
    background: var(--accent);
}

.section-wrap,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
}

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2,
.side-panel h2,
.footer-links h2 {
    margin: 6px 0 0;
    color: white;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
}

.side-panel h2,
.footer-links h2 {
    font-size: 20px;
}

.section-link {
    color: var(--accent);
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.search-box span {
    color: var(--accent);
    font-size: 22px;
}

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

.search-box input::placeholder {
    color: #64748b;
}

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

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 8px 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.46);
}

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

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.movie-card:hover .poster-link img,
.related-card:hover img {
    transform: scale(1.08);
    filter: brightness(0.82);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

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

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 38px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: white;
    font-weight: 900;
    font-size: 13px;
}

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

.movie-card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h2 {
    margin: 10px 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.4;
}

.movie-card h2 a:hover {
    color: var(--accent);
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

.rank-panel,
.category-panel,
.side-panel,
.detail-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.76);
    box-shadow: var(--shadow);
}

.rank-panel,
.category-panel,
.side-panel,
.detail-card {
    padding: 24px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row:hover {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.1);
}

.rank-number {
    color: var(--accent);
    font-weight: 900;
}

.rank-title {
    color: white;
    font-weight: 800;
}

.rank-meta,
.rank-heat {
    color: var(--muted);
    font-size: 13px;
}

.rank-heat {
    min-width: 48px;
    text-align: right;
    color: var(--accent);
    font-weight: 900;
}

.mini-category-grid,
.category-grid-page {
    display: grid;
    gap: 14px;
}

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

.category-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.8));
    overflow: hidden;
}

.category-card-main {
    display: block;
    padding: 20px;
}

.category-card-main span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.category-card-main h2 {
    margin: 0 0 8px;
    color: white;
}

.category-card-main p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.category-card-main:hover h2,
.category-samples a:hover {
    color: var(--accent);
}

.category-samples {
    display: grid;
    gap: 1px;
    background: rgba(148, 163, 184, 0.12);
}

.category-samples a {
    padding: 11px 18px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.88);
    font-size: 14px;
}

.page-hero {
    position: relative;
    min-height: 420px;
    display: grid;
    align-items: center;
    overflow: hidden;
    background-color: #111827;
    background-position: center;
    background-size: cover;
}

.compact-hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 26rem),
        linear-gradient(135deg, #1e293b 0%, #020617 100%);
}

.compact-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), #0f172a);
}

.page-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 100px 0 72px;
}

.page-hero-inner h1 {
    max-width: 780px;
    margin: 12px 0 16px;
    color: white;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero-inner p {
    max-width: 720px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

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

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

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    padding: 0;
    overflow: hidden;
    background: #000;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.64));
    cursor: pointer;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 32px;
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
}

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

.detail-card h1 {
    margin: 0 0 14px;
    color: white;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.detail-one-line {
    margin: 24px 0;
    color: var(--accent);
    font-size: 20px;
    line-height: 1.75;
    font-style: italic;
}

.detail-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-section h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.95;
}

.detail-tags span {
    font-size: 13px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.related-card {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-card:hover {
    border-color: rgba(245, 158, 11, 0.42);
}

.related-card img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.related-card strong,
.related-card em,
.related-card small {
    display: block;
}

.related-card strong {
    color: white;
    line-height: 1.45;
}

.related-card em {
    margin: 4px 0;
    color: var(--accent);
    font-style: normal;
    font-size: 12px;
}

.related-card small {
    color: var(--muted);
    line-height: 1.45;
}

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

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

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 10px;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

.hidden-by-filter {
    display: none !important;
}

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

    .split-section,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        min-height: 760px;
    }

    .hero-slide {
        padding: 96px 16px 160px;
        align-items: start;
    }

    .hero-content {
        width: 100%;
        padding-top: 34px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 30px;
    }

    .hero-category-pills {
        bottom: 66px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .rank-row,
    .rank-row-wide {
        grid-template-columns: 42px 1fr auto;
    }

    .rank-meta {
        display: none;
    }

    .detail-wrap,
    .section-wrap {
        width: min(100% - 24px, 1180px);
        padding: 46px 0;
    }
}

@media (max-width: 520px) {
    .logo-text {
        font-size: 17px;
    }

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

    .movie-grid,
    .featured-grid,
    .category-grid-page {
        grid-template-columns: 1fr;
    }

    .movie-card p {
        min-height: auto;
    }

    .hero-actions,
    .filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .filter-chip {
        width: 100%;
    }

    .related-card {
        grid-template-columns: 72px 1fr;
    }

    .related-card img {
        width: 72px;
    }
}
