:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --red: #dc2626;
    --pink: #db2777;
    --blue: #2563eb;
    --green: #16a34a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #dc2626, #db2777);
    color: #fff;
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.28);
    font-weight: 900;
}

.logo-title {
    display: block;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    display: block;
    margin-top: -3px;
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-size: 15px;
    font-weight: 650;
}

.nav a {
    position: relative;
    transition: color 0.22s ease;
}

.nav a:hover {
    color: var(--orange);
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    transition: width 0.22s ease;
}

.nav a:hover::after {
    width: 100%;
}

.menu-button {
    display: none;
    border: 0;
    background: #fff7ed;
    color: var(--orange);
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 800;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 0 18px;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav a {
    background: #fff7ed;
    color: #9a3412;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.28), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(251, 191, 36, 0.36), transparent 28%),
        linear-gradient(135deg, #ea580c 0%, #dc2626 47%, #db2777 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.20;
    background-image:
        linear-gradient(rgba(255,255,255,0.20) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.20) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -32% -10%;
    height: 46%;
    background: rgba(255, 255, 255, 0.14);
    filter: blur(40px);
    transform: rotate(-2deg);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 42px;
    padding: 70px 0 88px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-weight: 800;
    font-size: 14px;
}

.hero-title {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.90);
    font-size: clamp(16px, 2vw, 22px);
}

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

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

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

.btn-primary {
    background: #ffffff;
    color: var(--orange);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(10px);
}

.hero-panel {
    position: relative;
    min-height: 420px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.42s ease, transform 0.42s ease;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
}

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

.poster img.is-missing,
.hero-poster img.is-missing {
    display: none;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.26), transparent 28%),
        linear-gradient(135deg, #fb923c, #dc2626, #be185d);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 10px 10px 0;
}

.hero-copy h2 {
    margin: 10px 0 10px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.16;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.90);
    margin: 0 0 18px;
}

.hero-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.hero .pill {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 9px;
}

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

.hero-dot.is-active {
    width: 28px;
    background: #fff;
}

.section {
    padding: 58px 0;
}

.section-tight {
    padding: 36px 0;
}

.section-alt {
    background: #ffffff;
}

.section-gradient-blue {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-gradient-dark {
    color: #fff;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-gradient-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.category-quick {
    position: relative;
    z-index: 3;
    margin-top: -58px;
}

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

.category-card,
.stat-card,
.info-card {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.category-card {
    padding: 20px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fb923c, #dc2626);
    color: #fff;
    font-size: 24px;
}

.category-card h3 {
    margin: 0 0 4px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.88);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(249, 115, 22, 0.35);
}

.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none;
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fb923c, #dc2626);
}

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent);
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.rank-badge {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

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

.card-desc {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.filters {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 12px;
    margin: 0 0 26px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.input,
.select {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: #111827;
    padding: 10px 13px;
    font: inherit;
}

.input:focus,
.select:focus {
    outline: 3px solid rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.65);
}

.page-hero {
    color: #fff;
    background:
        radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.20), transparent 24%),
        linear-gradient(135deg, #111827, #7c2d12 52%, #be123c);
    padding: 58px 0 76px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255,255,255,0.78);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.72);
    font-size: 14px;
}

.breadcrumb a {
    color: #fff;
    font-weight: 800;
}

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

.player-card {
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.35), transparent 30%),
        linear-gradient(135deg, #111827, #020617);
}

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    background:
        linear-gradient(to top, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.18)),
        transparent;
    font: inherit;
}

.play-overlay.is-hidden {
    display: none;
}

.play-button-core {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    font-weight: 900;
    box-shadow: 0 18px 38px rgba(234, 88, 12, 0.38);
}

.player-note {
    margin: 0;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 13px;
}

.article-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
}

.article-card h2,
.sidebar-card h2 {
    margin-top: 0;
    letter-spacing: -0.02em;
}

.article-card p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 16px;
}

.sidebar-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

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

.related-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.related-item:hover {
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateX(3px);
}


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

.related-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    background: linear-gradient(135deg, #fb923c, #dc2626);
}

.related-item strong {
    display: block;
    line-height: 1.32;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.stat-card {
    padding: 24px;
    text-align: center;
}

.stat-number {
    display: block;
    color: var(--orange);
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
}

.stat-label {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 1fr auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: var(--shadow-soft);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    font-weight: 950;
}

.rank-row h3 {
    margin: 0 0 4px;
    line-height: 1.25;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.pagination-note {
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    margin-top: 58px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 46px 0;
}

.footer-grid h3 {
    color: #fff;
    margin-top: 0;
}

.footer-grid p,
.footer-grid a {
    color: #9ca3af;
    font-size: 14px;
}

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

.copyright {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 18px 0;
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
}

.empty-state {
    display: none;
    text-align: center;
    padding: 40px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: #fff;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

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

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

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 54px 0 84px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        min-height: 250px;
    }

    .filters {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

    .logo-subtitle {
        display: none;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-panel {
        min-height: 565px;
    }

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

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

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

    .rank-row .btn {
        grid-column: 1 / -1;
    }

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

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