:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.12), transparent 34%), linear-gradient(135deg, #0f172a 0%, #111827 44%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74));
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.navbar {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.brand-name {
    font-size: 1.35rem;
}

.brand-name span {
    color: var(--accent-light);
}

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

.nav-link,
.dropdown-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.25s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 210px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-panel a,
.mobile-categories a,
.footer-links a {
    display: block;
    color: var(--muted);
    padding: 9px 12px;
    border-radius: 12px;
    transition: 0.25s ease;
}

.dropdown-panel a:hover,
.mobile-categories a:hover,
.footer-links a:hover {
    color: #111827;
    background: var(--accent-light);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.top-search input {
    width: 170px;
    padding: 8px 8px 8px 12px;
}

.top-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #111827;
    background: var(--accent-light);
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.68);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 3px;
}

.mobile-panel {
    width: min(100%, 480px);
    margin-left: auto;
    padding: 18px 20px 26px;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

.mobile-links {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.mobile-link {
    display: block;
    padding: 12px;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.6);
}

.mobile-link.active,
.mobile-link:hover {
    color: #111827;
    background: var(--accent-light);
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.92)), linear-gradient(0deg, #0f172a, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 148px 0 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    width: max-content;
    padding: 7px 14px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(245, 158, 11, 0.12);
    font-weight: 800;
    font-size: 0.86rem;
}

.hero-content h1 {
    max-width: 780px;
    margin: 22px 0 20px;
    font-size: clamp(2.8rem, 8vw, 6.5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.hero-tags,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.card-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.25s ease;
}

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.3);
}

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

.ghost-button,
.section-more {
    color: var(--accent-light);
    border: 1px solid rgba(251, 191, 36, 0.36);
    background: rgba(15, 23, 42, 0.5);
}

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

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

.hero-dot.active {
    background: var(--accent-light);
}

.hero-strip {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.compact-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: 0.25s ease;
}

.compact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.55);
}

.compact-card img {
    width: 100%;
    height: 100%;
    min-height: 116px;
    object-fit: cover;
    filter: brightness(0.72);
}

.compact-card span {
    position: absolute;
    inset: auto 10px 10px;
    color: #fff;
    font-weight: 900;
    font-size: 0.92rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.content-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 74px 0;
}

.alt-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1240px) / 2));
    padding-right: max(16px, calc((100% - 1240px) / 2));
    background: rgba(15, 23, 42, 0.58);
}

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

.section-heading h2,
.page-hero h1,
.detail-title-block h1,
.detail-content h2,
.related-panel h2,
.site-footer h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-heading p,
.page-hero p,
.detail-title-block p,
.movie-card p,
.ranking-item p,
.site-footer p {
    color: var(--muted);
}

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

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    transition: 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(30, 41, 59, 0.92);
}

.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.5s ease;
}

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

.play-badge,
.score-badge {
    position: absolute;
    display: inline-grid;
    place-items: center;
    color: #111827;
    background: var(--accent-light);
    font-weight: 900;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: 0.25s ease;
}

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

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 46px;
    height: 30px;
    border-radius: 999px;
}

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

.movie-card h2 {
    min-height: 3.1em;
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.45;
}

.movie-card h2 a:hover,
.ranking-item h2 a:hover,
.detail-tags a:hover {
    color: var(--accent-light);
}

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

.tag-row span,
.detail-tags a {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.65);
    font-size: 0.82rem;
}

.category-feature-grid,
.category-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.category-feature,
.category-tile {
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.82));
}

.category-feature > a,
.category-tile > a {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.category-feature span,
.category-tile span {
    color: var(--accent-light);
    font-weight: 900;
}

.category-feature strong,
.category-tile strong {
    color: var(--muted);
    font-weight: 600;
}

.category-feature > div,
.mini-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ranking-strip,
.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-strip {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ranking-item {
    display: grid;
    grid-template-columns: 124px 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 14px;
    background: var(--panel);
}

.ranking-item.compact {
    grid-template-columns: 96px 1fr;
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 30px;
    border-radius: 999px;
    color: #111827;
    background: var(--accent-light);
    font-weight: 900;
}

.ranking-item h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px max(16px, calc((100% - 1240px) / 2)) 54px;
    background: radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.18), transparent 34%), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.76));
    border-bottom: 1px solid var(--border);
}

.small-hero h1 {
    max-width: 880px;
    margin: 18px 0 12px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
}

.small-hero p {
    max-width: 820px;
    font-size: 1.08rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    max-width: 950px;
    margin-top: 28px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.64);
}

.filter-panel span {
    color: var(--soft);
    font-size: 0.84rem;
}

.filter-panel select option {
    color: #111827;
}

.no-results {
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: var(--panel);
}

.breadcrumb {
    width: min(1240px, calc(100% - 32px));
    margin: 24px auto 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--soft);
}

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

.detail-main {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.74));
}

.player-section,
.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.player-section {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: center;
    padding-bottom: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    font-size: 2rem;
    box-shadow: 0 22px 60px rgba(245, 158, 11, 0.34);
}

.detail-title-block h1 {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 34px 0 82px;
}

.detail-content,
.related-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.detail-content {
    padding: 28px;
}

.detail-content h2,
.related-panel h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: var(--text);
}

.detail-content p {
    color: var(--muted);
    text-align: justify;
}

.review-text p + p {
    margin-top: 12px;
}

.related-panel {
    position: sticky;
    top: 92px;
    height: max-content;
    padding: 18px;
}

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

.related-list .compact-card {
    min-height: 92px;
}

.related-list .compact-card img {
    min-height: 92px;
}

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

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

.footer-brand {
    margin-bottom: 12px;
    color: var(--accent-light);
    font-size: 1.3rem;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--border);
    color: var(--soft);
    font-size: 0.92rem;
}

@media (max-width: 980px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .filter-panel,
    .player-section,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .related-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .navbar {
        width: calc(100% - 24px);
        height: 64px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .hero-content {
        padding-top: 110px;
        padding-bottom: 250px;
    }

    .hero-strip {
        grid-template-columns: repeat(2, 1fr);
        bottom: 22px;
    }

    .hero-controls {
        bottom: 220px;
    }

    .content-section {
        width: calc(100% - 24px);
        padding: 48px 0;
    }

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

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

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

    .movie-card h2 {
        font-size: 0.95rem;
    }

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

    .ranking-item,
    .ranking-item.compact {
        grid-template-columns: 92px 1fr;
    }

    .player-section,
    .detail-layout,
    .breadcrumb {
        width: calc(100% - 24px);
    }

    .player-shell {
        border-radius: 18px;
    }

    .detail-content {
        padding: 20px;
    }

    .footer-links,
    .category-feature > div,
    .mini-row {
        grid-template-columns: 1fr;
    }
}
