:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --amber-deep: #d97706;
    --orange: #f97316;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
    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.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.site-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.site-logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.36);
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.site-logo-text strong {
    font-size: 20px;
    letter-spacing: -0.03em;
}

.site-logo-text small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.site-nav a,
.mobile-menu a {
    color: #dbeafe;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-menu a:hover,
.mobile-menu a.is-active {
    color: var(--amber);
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 7px;
    min-width: 250px;
}

.header-search-form input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 7px 8px;
}

.header-search-form button,
.primary-button,
.secondary-button,
.text-link {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search-form button,
.primary-button {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    padding: 9px 16px;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.26);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.58);
}

.header-search-form button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: white;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 12px;
}

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

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

.mobile-search {
    min-width: 0;
}

.page-shell {
    min-height: 60vh;
}

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

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

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 44%, rgba(2, 6, 23, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 96px 24px 86px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero-eyebrow,
.section-heading p,
.page-hero p {
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 850;
    margin: 0 0 12px;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    text-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.hero-content h3 {
    margin: 0 0 16px;
    color: #fde68a;
    font-size: clamp(22px, 3vw, 36px);
}

.hero-content p:not(.hero-eyebrow) {
    max-width: 720px;
    margin: 0 0 20px;
    color: #dbeafe;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
}

.hero-tags,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-tags span {
    padding: 8px 14px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.92);
    transform: translateY(-1px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.content-section,
.toolbar-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title-block h1 {
    margin: 0;
    color: white;
    letter-spacing: -0.04em;
}

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

.section-heading a,
.text-link {
    color: var(--amber);
    font-weight: 800;
}

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

.movie-card {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.13);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(2, 6, 23, 0.95));
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
}

.movie-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge-top {
    top: 10px;
    right: 10px;
}

.movie-badge-bottom {
    left: 10px;
    bottom: 10px;
}

.movie-play-icon {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.94);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-body h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.movie-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

.movie-card-meta span:last-child {
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.85);
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}

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

.category-card,
.category-overview-card,
.aside-card,
.detail-text-card,
.tag-panel,
.detail-stats div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.category-card {
    padding: 22px;
}

.category-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 20px;
    font-weight: 850;
}

.category-card-head span {
    color: var(--amber);
    font-size: 13px;
}

.category-card p,
.category-overview-copy p {
    color: var(--muted);
    line-height: 1.8;
}

.category-card-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

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

.category-card-links a:hover {
    color: var(--amber);
}

.horizontal-section {
    overflow: hidden;
}

.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 18px;
    scrollbar-color: var(--amber) rgba(30, 41, 59, 0.7);
}

.compact-card {
    width: 148px;
    min-width: 148px;
    display: grid;
    gap: 9px;
    color: white;
}

.compact-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
}

.compact-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 750;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: translateX(3px);
}

.rank-number {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-item img {
    width: 96px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
}

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

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

.rank-copy small,
.rank-item em {
    color: var(--muted);
    font-style: normal;
}

.page-hero {
    padding: 82px 24px 44px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7)),
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 30rem);
    border-bottom: 1px solid var(--line);
}

.compact-hero {
    padding-bottom: 36px;
}

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

.page-hero span {
    display: block;
    max-width: 820px;
    margin: 0 auto;
    color: #cbd5e1;
    line-height: 1.85;
}

.category-overview-list {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    padding: 24px;
}

.category-overview-copy h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

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

.toolbar-section {
    display: grid;
    gap: 16px;
}

.page-search-input {
    width: 100%;
    color: white;
    outline: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
    padding: 16px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

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

.filter-chip.is-active,
.filter-chip:hover {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-color: transparent;
}

.empty-state {
    margin: 42px 0;
    color: var(--muted);
    text-align: center;
}

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    cursor: pointer;
    color: white;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24)),
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 22rem);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    font-size: 30px;
    box-shadow: 0 16px 42px rgba(245, 158, 11, 0.35);
}

.player-overlay strong {
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(22px, 4vw, 40px);
}

.player-overlay em {
    color: #fde68a;
    font-style: normal;
    font-weight: 800;
}

.detail-title-block {
    padding: 24px 0 4px;
}

.detail-title-block p {
    color: var(--amber);
    font-weight: 800;
    margin: 0 0 12px;
}

.detail-title-block h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 14px;
}

.detail-title-block span {
    display: block;
    color: #dbeafe;
    line-height: 1.85;
    font-size: 17px;
}

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

.detail-stats div {
    padding: 18px;
}

.detail-stats small {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.detail-stats strong {
    color: white;
}

.detail-text-card,
.tag-panel {
    padding: 24px;
    margin-bottom: 18px;
}

.detail-text-card h2,
.tag-panel h2,
.aside-card h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 22px;
}

.detail-text-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
}

.tag-panel div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-panel a {
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.9);
}

.tag-panel a:hover {
    background: rgba(245, 158, 11, 0.92);
    color: white;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 18px;
    position: sticky;
    top: 100px;
}

.aside-card {
    padding: 20px;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.poster-aside img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.9);
    margin-bottom: 16px;
}

.full-button {
    display: flex;
    justify-content: center;
}

.related-section {
    padding-top: 14px;
}

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

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

.footer-inner h2,
.footer-inner h3 {
    color: white;
    margin: 0 0 16px;
}

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

.footer-inner a {
    display: block;
    margin-bottom: 8px;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    padding: 18px 24px;
    font-size: 13px;
}

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

    .site-nav,
    .site-header-inner > .header-search-form {
        display: none;
    }

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

@media (max-width: 900px) {
    .hero-carousel {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

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

    .category-grid,
    .category-overview-card,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-aside {
        position: static;
    }

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

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

@media (max-width: 640px) {
    .site-header-inner {
        min-height: 66px;
        padding: 0 16px;
    }

    .site-logo-text small {
        display: none;
    }

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

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

    .hero-content {
        padding: 80px 18px 72px;
    }

    .hero-actions,
    .hero-tags {
        width: 100%;
    }

    .hero-actions a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .content-section,
    .toolbar-section,
    .detail-layout,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 42px 74px minmax(0, 1fr);
    }

    .rank-item em {
        display: none;
    }

    .rank-item img {
        width: 74px;
        height: 52px;
    }

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

    .compact-card {
        width: 126px;
        min-width: 126px;
    }

    .player-button {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }
}
