:root {
    --page-bg: #f9fafb;
    --surface: #ffffff;
    --surface-strong: #f3f4f6;
    --text: #111827;
    --muted: #6b7280;
    --soft: #9ca3af;
    --line: #e5e7eb;
    --accent: #ea580c;
    --accent-dark: #c2410c;
    --accent-red: #dc2626;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.brand-text {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ea580c, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 13px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent);
    background: #fff7ed;
}

.header-search {
    position: relative;
    margin-left: auto;
    width: min(360px, 32vw);
}

.header-search label,
.mobile-panel label,
.page-filter {
    display: block;
}

.header-search span,
.mobile-panel label span,
.page-filter span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.site-search-input,
.page-filter input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input:focus,
.page-filter input:focus {
    border-color: rgba(234, 88, 12, 0.7);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    max-height: 360px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
}

.search-suggestions.is-open {
    display: grid;
    gap: 4px;
}

.search-suggestions a {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
}

.search-suggestions a:hover {
    background: #fff7ed;
}

.search-suggestions strong {
    font-size: 14px;
}

.search-suggestions em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--text);
    background: #fff7ed;
    border-radius: 12px;
    width: 42px;
    height: 42px;
}

.mobile-panel {
    display: none;
    padding: 14px 24px 20px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.mobile-panel a {
    display: block;
    padding: 11px 0;
    font-weight: 800;
    color: #374151;
}

.hero {
    position: relative;
    height: 600px;
    color: #ffffff;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.hero-bg {
    position: absolute;
    inset: -20px;
    background-position: center;
    background-size: cover;
    filter: blur(8px);
    transform: scale(1.04);
    opacity: 0.34;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 30%, rgba(249, 115, 22, 0.28), transparent 32%), linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.76) 48%, rgba(17, 24, 39, 0.38));
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    max-width: 760px;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: #fb923c;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(251, 146, 60, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero-summary {
    max-width: 700px;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.9;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.tag-row span {
    color: #9a3412;
    background: #fff7ed;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.32);
}

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

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(1deg);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    right: 18px;
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 14px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(10px);
    font-weight: 900;
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: #f97316;
}

.page-main,
.detail-main,
.content-section,
.quick-filter-section {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.content-section,
.quick-filter-section {
    margin-top: 54px;
}

.quick-filter-card,
.ranking-panel,
.page-hero,
.story-card,
.category-overview-card,
.rank-sidebar {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.06);
}

.quick-filter-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 32px;
    align-items: center;
    padding: 28px;
}

.quick-filter-card h2,
.section-heading h2,
.page-hero h1,
.ranking-copy h2,
.story-card h2,
.rank-sidebar h2 {
    margin: 10px 0 0;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.quick-filter-card h2,
.section-heading h2,
.ranking-copy h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.quick-filter-card p,
.section-heading p,
.page-hero p,
.ranking-copy p,
.story-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

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

.section-more,
.text-button {
    color: var(--accent);
    background: #fff7ed;
    padding: 11px 16px;
}

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

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

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

.movie-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 20px 38px rgba(17, 24, 39, 0.12);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.78), transparent 52%);
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 9px;
    backdrop-filter: blur(10px);
}

.movie-year {
    right: 12px;
    background: rgba(17, 24, 39, 0.72);
}

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

.poster-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.96);
    box-shadow: 0 10px 26px rgba(234, 88, 12, 0.34);
}

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

.movie-title-link h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--accent);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 13px;
    margin: 8px 0;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    border-radius: 22px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.12);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.2));
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 600;
}

.ranking-panel {
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 36px;
    align-items: center;
}

.rank-list,
.rank-sidebar {
    display: grid;
    gap: 9px;
}

.rank-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.rank-row span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

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

.rank-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    margin-top: 36px;
    padding: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    background: radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.14), transparent 32%), #ffffff;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.page-filter.in-hero {
    min-width: min(380px, 100%);
}

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

.category-overview-card {
    padding: 18px;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

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

.category-preview img {
    height: 164px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 0;
    font-size: 24px;
}

.category-overview-card p {
    color: var(--muted);
}

.ranking-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 26px;
}

.rank-sidebar {
    position: sticky;
    top: 90px;
    padding: 22px;
}

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

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

.detail-hero {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 34px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.26), transparent 35%), linear-gradient(135deg, #111827, #1f2937);
    box-shadow: var(--shadow);
}

.detail-poster-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 16px 0 12px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-one-line {
    color: #e5e7eb;
    font-size: 18px;
    max-width: 840px;
}

.detail-meta-grid {
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.detail-meta-grid span {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-meta-grid strong {
    color: #fdba74;
    font-size: 12px;
}

.detail-tags {
    margin-bottom: 24px;
}

.player-section,
.story-section,
.related-section {
    margin-top: 42px;
}

.player-shell {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.48);
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.play-ring,
.player-cover strong {
    position: relative;
    z-index: 1;
}

.play-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 18px 42px rgba(234, 88, 12, 0.35);
    font-size: 30px;
}

.player-cover strong {
    font-size: 18px;
}

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

.story-card {
    padding: 28px;
}

.story-card h2 {
    font-size: 28px;
}

.story-card p {
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand .brand-icon {
    width: 34px;
    height: 34px;
}

.footer-inner p {
    max-width: 520px;
    color: #9ca3af;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: #fb923c;
}

[data-card].is-hidden {
    display: none;
}

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

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

    .hero-inner {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 28px;
    }

    .ranking-page-grid {
        grid-template-columns: 1fr;
    }

    .rank-sidebar {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        gap: 12px;
        height: 64px;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .mobile-panel .search-suggestions {
        position: static;
        margin-top: 8px;
    }

    .hero {
        height: auto;
        min-height: 650px;
    }

    .hero-inner {
        min-height: 650px;
        grid-template-columns: 1fr;
        padding-top: 50px;
        padding-bottom: 92px;
    }

    .hero-poster {
        max-width: 230px;
        transform: none;
    }

    .quick-filter-card,
    .ranking-panel,
    .page-hero,
    .detail-hero,
    .story-section,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 30px;
        align-items: stretch;
    }

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

    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .header-inner,
    .page-main,
    .detail-main,
    .content-section,
    .quick-filter-section,
    .hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-text {
        font-size: 18px;
    }

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

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

    .movie-title-link h3 {
        font-size: 15px;
        min-height: 42px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .rank-row em {
        display: none;
    }

    .detail-hero {
        padding: 20px;
    }

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

    .play-ring {
        width: 66px;
        height: 66px;
    }
}
