:root {
    color-scheme: light;
    --brand: #ea580c;
    --brand-dark: #c2410c;
    --brand-light: #fb923c;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --panel: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.28);
}

.main-nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    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;
    white-space: nowrap;
}

.brand {
    font-size: 22px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 9px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input {
    width: 160px;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.nav-search button,
.quick-search-panel button,
.search-page-panel button {
    border: 0;
    border-radius: 999px;
    color: #ea580c;
    background: #ffffff;
    padding: 8px 14px;
    font-weight: 800;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel a {
    display: block;
    padding: 12px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-carousel {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #111827;
}

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

.hero-slide {
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.12) contrast(1.02);
}

.hero-mask {
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.24) 100%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.12) 0%, rgba(17, 24, 39, 0.82) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--brand-light);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-copy-slide {
    display: none;
    max-width: 720px;
}

.hero-copy-slide.is-active {
    display: block;
    animation: riseIn 0.55s ease both;
}

.hero-copy-slide h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
}

.hero-copy-slide p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line span {
    background: #fff7ed;
    color: #9a3412;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.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;
}

.primary-button {
    padding: 13px 24px;
    color: #ffffff;
    background: linear-gradient(90deg, #ea580c, #fb923c);
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.34);
}

.ghost-button {
    padding: 12px 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

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

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

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

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

.quick-search-panel,
.content-section,
.page-main,
.site-footer .footer-inner,
.copyright {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 5;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel form,
.search-page-panel form,
.filter-panel {
    display: flex;
    gap: 12px;
}

.quick-search-panel input,
.search-page-panel input,
.filter-panel input,
.filter-panel select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #ffffff;
    padding: 0 18px;
}

.quick-search-panel input,
.search-page-panel input,
.filter-panel input {
    flex: 1;
}

.quick-search-panel button,
.search-page-panel button {
    color: #ffffff;
    background: linear-gradient(90deg, #ea580c, #f97316);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 14px;
    font-weight: 800;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-intro,
.page-hero p,
.category-overview-main p,
.detail-copy p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.section-more,
.text-button {
    color: var(--brand);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.15);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #9a3412);
}

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

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

.score-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.score-badge {
    top: 12px;
    left: 12px;
    min-width: 44px;
    height: 28px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.92);
}

.play-badge {
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 16px;
}

.movie-info h2 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-info h2 a:hover,
.ranking-card h2 a:hover,
.detail-article a:hover {
    color: var(--brand);
}

.movie-card-summary {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

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

.tag-list span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 12px;
    font-weight: 800;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.72fr);
    gap: 28px;
}

.rank-list {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-item strong {
    color: var(--brand);
    font-size: 22px;
    font-weight: 950;
}

.rank-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 850;
}

.rank-item em {
    color: #9a3412;
    font-style: normal;
    font-weight: 900;
}

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

.category-card,
.category-overview-card,
.filter-panel,
.search-page-panel,
.page-hero,
.detail-hero,
.detail-article,
.detail-sidebar,
.player-shell,
.ranking-card {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
}

.category-card a:first-child {
    display: block;
    padding: 18px;
}

.category-card h2 {
    margin: 10px 0 8px;
    font-size: 20px;
    font-weight: 900;
}

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

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ea580c, #fb923c);
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px 18px;
}

.category-sample a {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f8fafc;
    color: #4b5563;
    font-size: 12px;
}

.page-main {
    padding: 38px 0 0;
}

.page-hero {
    padding: 36px;
    margin-bottom: 28px;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.16), transparent 34%),
        rgba(255, 255, 255, 0.94);
}

.small-hero {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

.category-overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    padding: 22px;
}

.category-overview-main {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.category-cover {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

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

.compact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
}

.compact-card img {
    grid-row: span 2;
    width: 58px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.compact-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.compact-card small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-panel,
.search-page-panel {
    padding: 16px;
    margin-bottom: 28px;
}

.empty-state {
    display: none;
    margin: 0 0 24px;
    padding: 18px;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 900;
}

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

.category-movie-grid {
    align-items: start;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 70px 110px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.ranking-card strong {
    color: var(--brand);
    font-size: 30px;
    font-weight: 950;
    text-align: center;
}

.ranking-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

.ranking-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.75;
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
}

.detail-hero {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(251, 146, 60, 0.18), transparent 34%),
        #ffffff;
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    background: #111827;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

.detail-cover img {
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.detail-copy p {
    font-size: 18px;
}

.detail-meta span {
    background: #fff7ed;
    color: #9a3412;
}

.detail-tags {
    margin-top: 18px;
}

.player-section {
    margin-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #050505;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(234, 88, 12, 0.34), rgba(0, 0, 0, 0.78) 56%),
        rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

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

.player-play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea580c, #fb923c);
    box-shadow: 0 20px 40px rgba(234, 88, 12, 0.38);
    font-size: 34px;
}

.player-play-title {
    max-width: min(760px, 86%);
    font-size: clamp(24px, 5vw, 44px);
    line-height: 1.2;
    font-weight: 950;
    text-align: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 28px;
}

.detail-article,
.detail-sidebar {
    padding: 24px;
}

.detail-article h2,
.detail-sidebar h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.detail-article h2:not(:first-child) {
    margin-top: 28px;
}

.detail-article p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.info-table {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-table div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-table dt {
    color: var(--muted);
    font-weight: 800;
}

.info-table dd {
    margin: 0;
    font-weight: 800;
}

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

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

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 38px;
    padding: 42px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 560px;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

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

.footer-links a {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    background: rgba(249, 115, 22, 0.28);
}

.copyright {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    text-align: center;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .nav-search {
        margin-left: auto;
    }

    .mobile-menu-button {
        display: block;
    }

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .main-nav {
        min-height: 62px;
        gap: 12px;
    }

    .brand span:last-child {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .hero-carousel {
        height: 600px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-copy-slide p {
        font-size: 16px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel form,
    .search-page-panel form,
    .filter-panel {
        flex-direction: column;
    }

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

    .movie-info h2 {
        font-size: 16px;
    }

    .movie-card-summary {
        min-height: auto;
    }

    .mini-category-grid,
    .compact-grid,
    .large-compact-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-main,
    .detail-hero,
    .ranking-card,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .category-cover {
        aspect-ratio: 16 / 9;
    }

    .detail-cover img {
        min-height: auto;
    }

    .page-hero,
    .detail-hero,
    .detail-article,
    .detail-sidebar {
        padding: 20px;
    }

    .ranking-card strong {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
}
