:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(15, 23, 42, 0.95);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(251, 191, 36, 0.34);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #fbbf24;
    --amber-deep: #d97706;
    --red: #ef4444;
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --shadow-amber: 0 18px 50px rgba(245, 158, 11, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(51, 65, 85, 0.72);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.34);
}

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

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #f8fafc, #fbbf24);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-subtitle {
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--muted);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.primary-nav a,
.mobile-panel a {
    color: var(--muted-strong);
    font-size: 0.95rem;
    font-weight: 650;
    transition: color 0.2s ease;
}

.primary-nav a:hover,
.mobile-panel a:hover {
    color: var(--amber);
}

.nav-link {
    position: relative;
    padding: 24px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 16px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--amber);
    transition: width 0.22s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 0 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.64);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 16px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

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

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

.hero-backdrop::before,
.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hero-backdrop::before {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.84) 42%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-backdrop::after {
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
    position: relative;
    min-height: 70vh;
    display: grid;
    align-items: center;
    padding: 80px 0 96px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 999px;
    color: var(--amber);
    background: rgba(245, 158, 11, 0.12);
    backdrop-filter: blur(14px);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.7rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-title-note {
    margin: 0 0 14px;
    color: var(--amber);
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    font-weight: 900;
}

.hero-description {
    margin: 24px 0 0;
    max-width: 660px;
    color: var(--muted-strong);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.85;
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    font-size: 0.82rem;
    font-weight: 700;
}

.pill.highlight {
    color: #fff7ed;
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(245, 158, 11, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: var(--shadow-amber);
}

.btn-primary:hover {
    box-shadow: 0 22px 70px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
}

.btn-ghost:hover {
    border-color: rgba(251, 191, 36, 0.46);
}

.hero-tools {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    transform: translateX(-50%);
    width: min(1180px, calc(100% - 32px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    border-color: rgba(251, 191, 36, 0.52);
    transform: translateY(-2px);
}

.main-section {
    padding: 76px 0;
}

.main-section.compact {
    padding: 52px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

.section-lead {
    margin: 10px 0 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    color: var(--amber);
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card {
    position: relative;
    min-height: 168px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 17rem),
        rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.48);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

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

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

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

.movie-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: var(--shadow-amber);
}

.movie-card.hidden {
    display: none;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(15, 23, 42, 0.95)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 12rem);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease, opacity 0.2s ease;
}

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

.poster-badges {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
    font-size: 0.74rem;
    font-weight: 800;
}

.badge.gold {
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.card-body {
    padding: 15px;
}

.card-title {
    margin: 0;
    min-height: 2.8em;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-summary {
    margin: 10px 0 0;
    min-height: 4.8em;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 12px;
    gap: 8px;
}

.card-meta span {
    color: var(--muted-strong);
    font-size: 0.76rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    padding: 5px 9px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    font-size: 0.76rem;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 26px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
}

.search-input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 0 10px;
}

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

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.filter-button {
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-button.active,
.filter-button:hover {
    color: #111827;
    border-color: transparent;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.page-hero {
    padding: 78px 0 34px;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 26rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0));
}

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

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 72px 88px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.42);
}

.rank-number {
    font-size: 1.85rem;
    font-weight: 950;
    color: var(--amber);
    text-align: center;
}

.rank-poster {
    width: 88px;
    aspect-ratio: 2 / 3;
    border-radius: 0.85rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
}

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

.rank-main h2,
.rank-main h3 {
    margin: 0 0 8px;
    font-size: 1.16rem;
}

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

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

.player-card {
    position: relative;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle at center, rgba(251, 191, 36, 0.18), transparent 16rem),
        rgba(2, 6, 23, 0.58);
    cursor: pointer;
}

.player-card.is-playing .play-mask,
.player-card.is-ready .play-mask.hide {
    opacity: 0;
    pointer-events: none;
}

.play-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 24px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: var(--shadow-amber);
    font-weight: 900;
}

.play-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.94);
}

.player-message {
    display: none;
    padding: 14px 18px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.28);
    border-top: 1px solid rgba(248, 113, 113, 0.24);
}

.player-message.show {
    display: block;
}

.detail-card,
.side-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h2,
.side-card h2,
.side-card h3 {
    margin: 0 0 14px;
}

.detail-card p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.side-card {
    padding: 18px;
}

.side-poster {
    border-radius: 1.05rem;
    overflow: hidden;
    margin-bottom: 18px;
    aspect-ratio: 2 / 3;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 850;
}

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

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

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

.footer-bottom {
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(51, 65, 85, 0.44);
    font-size: 0.9rem;
}

.empty-state {
    display: none;
    padding: 40px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: var(--radius-lg);
    color: var(--muted);
    text-align: center;
}

.empty-state.show {
    display: block;
}

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-tools {
        align-items: flex-end;
    }

    .hero-arrows {
        display: none;
    }

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

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

    .ranking-item {
        grid-template-columns: 52px 76px 1fr;
    }

    .ranking-item .btn {
        grid-column: 2 / -1;
        width: max-content;
    }

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

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .logo-title {
        font-size: 1.05rem;
    }

    .logo-subtitle {
        display: none;
    }

    .hero-content {
        padding: 54px 0 100px;
    }

    .hero-description {
        -webkit-line-clamp: 4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-dot {
        width: 24px;
    }

    .hero-dot.active {
        width: 44px;
    }

    .main-section {
        padding: 54px 0;
    }

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

    .search-panel {
        border-radius: 1.2rem;
    }

    .card-body {
        padding: 12px;
    }

    .card-summary {
        display: none;
    }

    .detail-card {
        padding: 20px;
    }
}
