:root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-soft: #f7f7f8;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #ea580c;
    --accent-dark: #c2410c;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--amber));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.24);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    flex: 1;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: #fff;
}

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

.mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    display: grid;
    gap: 14px;
}

.hero {
    position: relative;
    height: min(680px, 82vh);
    min-height: 520px;
    overflow: hidden;
    background: #0b0f19;
}

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

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

.hero-media,
.hero-media img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-media {
    background: radial-gradient(circle at 75% 30%, rgba(249, 115, 22, 0.26), transparent 35%), linear-gradient(135deg, #111827, #030712);
}

.hero-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.20) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 42%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: clamp(76px, 12vh, 132px);
    color: #fff;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.eyebrow {
    color: var(--accent);
    background: #fff7ed;
    margin: 0 0 10px;
}

.hero h1 {
    max-width: 780px;
    margin: 18px 0 14px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 740px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.24);
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.button-ghost-dark {
    color: #111827;
    background: #fff;
    border: 1px solid var(--border);
}

.button-link {
    color: #fed7aa;
    padding-inline: 6px;
}

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

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

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

.section {
    padding: 72px 0;
}

.section-muted {
    background: var(--bg-soft);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: #fed7aa;
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.movie-card--large .poster-frame {
    aspect-ratio: 16 / 11;
}

.poster-frame img,
.category-poster img,
.rank-cover img,
.rank-card-poster img,
.detail-poster img,
.category-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 4px 9px;
    color: #fff;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.movie-card-body strong {
    font-size: 18px;
    line-height: 1.25;
}

.movie-meta {
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    min-height: 42px;
    color: #4b5563;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-card-large {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    background: linear-gradient(135deg, #111827, #9a3412);
    box-shadow: var(--shadow);
}

.category-poster {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

.category-title,
.category-desc {
    position: relative;
    z-index: 2;
}

.category-title {
    font-size: 21px;
    font-weight: 900;
}

.category-desc {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 104px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.rank-no,
.rank-card-no {
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
}

.rank-cover,
.rank-card-poster {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.rank-copy {
    display: grid;
    gap: 4px;
}

.rank-copy strong {
    font-size: 17px;
}

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

.rank-tag {
    color: #9a3412;
    background: #ffedd5;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.search-panel {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.empty-state {
    display: none;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

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

.page-main {
    background: #fff;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 78% 16%, rgba(249, 115, 22, 0.30), transparent 34%), linear-gradient(135deg, #111827, #030712);
    color: #fff;
}

.page-hero-inner {
    padding: 86px 0;
}

.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.05em;
}

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

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

.category-card-large {
    min-height: 260px;
}

.category-collage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    opacity: 0.34;
}

.category-collage span {
    min-width: 0;
    background: #111827;
}

.category-collage img {
    opacity: 0.92;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: 70px 120px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-card-copy {
    display: grid;
    gap: 7px;
}

.rank-card-copy strong {
    font-size: 20px;
}

.rank-card-meta {
    color: var(--muted);
    font-weight: 700;
}

.detail-hero {
    padding: 64px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.5fr 0.65fr;
    align-items: center;
    gap: 42px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fed7aa;
}

.detail-meta span {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.10);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #111827, #9a3412);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.player-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #030712;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.16), rgba(0, 0, 0, 0.42));
    transition: opacity 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
}

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

.player-button {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 18px 46px rgba(234, 88, 12, 0.42);
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
    transform: scale(1.08);
    background: var(--accent-dark);
}

.detail-article {
    max-width: 960px;
}

.detail-article article {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

.detail-article p + h2 {
    margin-top: 30px;
}

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

.site-footer {
    padding: 48px 0;
    background: #0b0f19;
    color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 560px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 12px;
}

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

    .menu-button {
        display: flex;
    }

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

    .rank-list,
    .category-grid--wide {
        grid-template-columns: 1fr;
    }

    .rank-item,
    .rank-card a {
        grid-template-columns: 52px 82px 1fr;
    }

    .rank-tag,
    .rank-card-meta {
        display: none;
    }

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

    .detail-poster {
        max-width: 360px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .brand-copy small {
        display: none;
    }

    .hero {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

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

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

    .section {
        padding: 48px 0;
    }

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

    .search-controls {
        grid-template-columns: 1fr;
    }

    .rank-item,
    .rank-card a {
        grid-template-columns: 46px 74px 1fr;
        gap: 10px;
    }

    .rank-card-copy strong {
        font-size: 16px;
    }

    .page-hero-inner,
    .detail-hero {
        padding: 54px 0;
    }

    .player-button {
        width: 66px;
        height: 66px;
    }
}
