:root {
    color-scheme: light;
    --site-bg: #f8fafc;
    --site-text: #0f172a;
    --site-muted: #64748b;
    --site-soft: #e2e8f0;
    --site-card: #ffffff;
    --site-dark: #0f172a;
    --site-dark-2: #1e293b;
    --site-accent: #f59e0b;
    --site-accent-dark: #d97706;
    --site-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    --site-radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--site-text);
    background: var(--site-bg);
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
}

.nav-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px;
}

.nav-main {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #e2e8f0;
    font-weight: 600;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
    color: var(--site-accent);
}

.nav-search {
    position: relative;
    width: 220px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.88);
    padding: 11px 44px 11px 16px;
}

.nav-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #0f172a;
    background: var(--site-accent);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
    color: #e2e8f0;
}

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

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 50%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    min-height: 70vh;
    margin: 0 auto;
    padding: 96px 18px 108px;
    display: flex;
    align-items: center;
}

.hero-text {
    width: min(720px, 100%);
}

.hero-kicker,
.detail-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #fbbf24;
    font-weight: 700;
}

.hero-text h1,
.hero-text h2 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-text h2 {
    font-size: clamp(34px, 5vw, 62px);
}

.hero-text p {
    max-width: 650px;
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions,
.section-heading,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.hero-actions {
    margin-top: 28px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 999px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--site-accent);
    padding: 12px 26px;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.35);
}

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

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    padding: 12px 22px;
    backdrop-filter: blur(14px);
}

.btn-ghost {
    color: var(--site-dark);
    background: #ffffff;
    padding: 10px 20px;
}

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

.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 700;
}

.tag {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.meta-pill {
    color: #92400e;
    background: #fef3c7;
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 18px;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--site-dark);
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 40px);
}

.section-subtitle,
.page-title p,
.category-card p,
.detail-title p,
.movie-card p,
.rank-item p {
    color: var(--site-muted);
    line-height: 1.75;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border-radius: var(--site-radius);
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: var(--site-shadow);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -34px;
    bottom: -44px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.22);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #cbd5e1;
}

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

.movie-card {
    background: var(--site-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.17);
}

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

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

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

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-body h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-body h3 a:hover {
    color: var(--site-accent-dark);
}

.movie-body p {
    margin: 0 0 14px;
    font-size: 14px;
}

.movie-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--site-muted);
    font-size: 13px;
}

.horizontal-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 4px 22px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
    display: none;
}

.horizontal-row .movie-card {
    flex: 0 0 290px;
    scroll-snap-align: start;
}

.scroll-wrap {
    position: relative;
}

.scroll-button {
    position: absolute;
    top: 38%;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
    cursor: pointer;
}

.scroll-button.left {
    left: -12px;
}

.scroll-button.right {
    right: -12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 76px 160px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.rank-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-item p {
    margin: 0;
}

.page-title {
    margin-bottom: 30px;
    padding: 38px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 68%, #92400e 100%);
    box-shadow: var(--site-shadow);
}

.page-title h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.page-title p {
    max-width: 820px;
    margin: 14px 0 0;
    color: #cbd5e1;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 0.7fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    color: var(--site-dark);
    background: #f8fafc;
    padding: 0 16px;
}

.filter-panel input:focus,
.filter-panel select:focus,
.nav-search input:focus {
    border-color: var(--site-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.breadcrumbs {
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: var(--site-accent-dark);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 38px;
}

.detail-cover {
    min-height: 420px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--site-shadow);
    background: #111827;
}

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

.detail-title {
    padding: 32px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--site-shadow);
}

.detail-title h1 {
    margin-top: 14px;
    font-size: clamp(34px, 4.6vw, 60px);
    line-height: 1.12;
}

.detail-title p {
    font-size: 17px;
}

.player-card {
    margin: 34px 0;
    padding: 18px;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--site-shadow);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
}

.player-wrap video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.82));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-ring {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--site-accent);
    box-shadow: 0 18px 55px rgba(245, 158, 11, 0.38);
    font-size: 34px;
}

.article-card {
    padding: 30px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.article-card p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 17px;
    line-height: 1.95;
}

.article-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 50px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 18px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-shell p {
    color: #94a3b8;
    line-height: 1.8;
}

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

.copyright {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

.hidden-card {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .filter-panel,
    .detail-hero,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 56px 120px 1fr;
    }

    .rank-item .btn-ghost {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .hero-content {
        padding: 84px 18px 108px;
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

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

    .horizontal-row .movie-card {
        flex-basis: 82vw;
    }

    .page-shell {
        padding: 38px 16px;
    }

    .page-title,
    .detail-title,
    .article-card {
        padding: 24px;
    }

    .rank-item {
        grid-template-columns: 48px 1fr;
    }

    .rank-thumb {
        grid-column: 1 / -1;
        width: 100%;
    }

    .detail-cover {
        min-height: 260px;
    }
}
