:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --panel: #1c1917;
    --panel-soft: #292524;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --line: #292524;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 30%), var(--bg);
    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;
    width: 100%;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.site-header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-logo-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #1c1917;
    font-size: 14px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link,
.mobile-link {
    color: #d6d3d1;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--accent);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
    border-radius: 3px;
}

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

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0c0a09 0%, rgba(12, 10, 9, 0.78) 34%, rgba(0, 0, 0, 0.22) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 72px;
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #1c1917;
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0 0 24px;
    color: #d6d3d1;
    font-size: 18px;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    color: #d6d3d1;
}

.hero-meta strong {
    color: #fbbf24;
    font-size: 20px;
}

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

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

.primary-button {
    background: var(--accent);
    color: #1c1917;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.page-main {
    padding-top: 96px;
}

.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-section {
    margin: 56px 0;
}

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

.section-heading h2,
.search-panel h2,
.spotlight-box h2,
.player-section h2,
.detail-article h2,
.detail-side-card h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 850;
}

.section-heading p,
.search-panel p,
.spotlight-box p,
.detail-side-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 38px 0;
    padding: 24px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    background: rgba(28, 25, 23, 0.82);
    box-shadow: var(--shadow);
}

.search-box {
    width: min(440px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(12, 10, 9, 0.82);
}

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

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

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(28, 25, 23, 0.86);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.movie-card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #292524, #0c0a09);
}

.movie-card-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #1c1917;
    font-size: 13px;
    font-weight: 900;
}

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

.movie-card-meta,
.detail-meta-grid dt {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 18px;
    line-height: 1.32;
    font-weight: 850;
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 44px;
    color: #d6d3d1;
    font-size: 14px;
    line-height: 1.55;
}

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

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 650;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
}

.movie-card-horizontal .movie-card-cover {
    min-height: 100%;
    aspect-ratio: auto;
}

.movie-card-horizontal .movie-card-body {
    min-width: 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 28px;
    align-items: stretch;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px 56px minmax(0, 1fr) 48px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.82);
}

.ranking-number {
    color: var(--accent);
    font-size: 20px;
    font-weight: 950;
}

.ranking-item img {
    width: 56px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #292524;
}

.ranking-info {
    min-width: 0;
}

.ranking-info strong,
.ranking-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.ranking-score {
    color: #fbbf24;
    font-weight: 900;
    text-align: right;
}

.spotlight-box {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    padding: 32px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(41, 37, 36, 0.86));
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 24px;
    background: #1c1917;
    border: 1px solid var(--line);
}

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.category-tile:hover img {
    opacity: 0.48;
    transform: scale(1.05);
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 20px;
}

.category-tile span {
    padding-top: 78px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: #d6d3d1;
    font-size: 14px;
    font-style: normal;
    line-height: 1.55;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(28, 25, 23, 0.92);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.site-footer p {
    max-width: 460px;
    color: var(--muted);
    line-height: 1.7;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: #d6d3d1;
    font-size: 14px;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: #78716c;
    font-size: 13px;
}

.page-hero {
    margin-top: 8px;
    padding: 56px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(28, 25, 23, 0.9));
    box-shadow: var(--shadow);
}

.page-hero span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    margin-bottom: 14px;
}

.page-hero p {
    max-width: 820px;
}

.category-panels {
    display: grid;
    gap: 24px;
    margin-top: 36px;
}

.category-panel {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(28, 25, 23, 0.88);
}

.category-panel-cover {
    min-height: 220px;
    background: #292524;
}

.category-panel-cover img {
    height: 100%;
    object-fit: cover;
}

.category-panel-body {
    padding: 26px;
}

.category-panel-body h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-panel-body p {
    margin: 0 0 18px;
    color: #d6d3d1;
    line-height: 1.7;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.category-preview a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.category-preview img {
    width: 44px;
    height: 58px;
    border-radius: 9px;
    object-fit: cover;
}

.category-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 30px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(12, 10, 9, 0.94));
    box-shadow: var(--shadow);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #292524;
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    height: 100%;
    object-fit: cover;
}

.detail-score {
    top: 16px;
    right: 16px;
    font-size: 16px;
}

.detail-info h1 {
    margin-top: 0;
}

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

.detail-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.detail-meta-grid dt {
    margin-bottom: 7px;
}

.detail-meta-grid dd {
    margin: 0;
    color: #fff;
    font-weight: 750;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section,
.detail-article,
.detail-side-card {
    margin-top: 46px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(28, 25, 23, 0.88);
}

.player-section h2 {
    margin-bottom: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.16), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    min-width: 136px;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #1c1917;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.24);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 26px;
}

.detail-article p {
    margin: 16px 0 0;
    color: #e7e5e4;
    line-height: 1.9;
    font-size: 16px;
}

.detail-side-card h2 + .tag-row,
.side-tags {
    margin: 16px 0 26px;
}

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

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        left: 20px;
        bottom: 62px;
    }

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

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

    .detail-poster {
        max-width: 360px;
    }

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

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

@media (max-width: 560px) {
    .site-header-inner,
    .page-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero-carousel {
        height: 520px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

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

    .movie-grid,
    .movie-grid-featured,
    .category-movie-grid,
    .related-grid,
    .ranking-grid,
    .category-grid,
    .category-preview {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .page-hero,
    .detail-hero,
    .player-section,
    .detail-article,
    .detail-side-card,
    .search-panel {
        padding: 20px;
        border-radius: 22px;
    }

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