:root {
    color-scheme: light;
    --bg: #f9fafb;
    --surface: #ffffff;
    --soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #ea580c;
    --amber: #d97706;
    --dark: #111827;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.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.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

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

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

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

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

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
    min-height: 620px;
    color: #ffffff;
}

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

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
    color: #fed7aa;
}

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

.hero p,
.page-hero p {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

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

.small-button {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    justify-content: center;
    border-radius: 14px;
    padding: 12px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
}

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

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

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

.search-strip {
    margin-top: -50px;
    position: relative;
    z-index: 8;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    border-radius: 22px;
    padding: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.search-form input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 15px;
    background: #ffffff;
    outline: none;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.search-form button {
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    color: #ffffff;
    background: var(--orange);
    font-weight: 800;
    cursor: pointer;
}

.section-block {
    padding: 64px 0;
}

.soft-bg {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

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

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

.section-more {
    color: var(--orange);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 146, 60, 0.42);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.play-mark {
    position: absolute;
    inset: 50% auto auto 50%;
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.64);
    font-size: 12px;
}

.movie-info {
    padding: 16px;
}

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

.movie-meta a {
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--orange);
    background: #fff7ed;
    font-weight: 700;
}

.movie-info h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info h3 a:hover {
    color: var(--orange);
}

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

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

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 3px 8px;
    color: #6b7280;
    background: #f3f4f6;
    font-size: 12px;
}

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

.category-card,
.category-overview {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.78;
}

.category-card span {
    position: absolute;
    inset: auto 18px 18px;
    display: grid;
    color: #ffffff;
}

.category-card strong {
    font-size: 22px;
}

.category-card small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 46px 90px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: 16px;
    padding: 12px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-number {
    color: var(--orange);
    font-size: 22px;
    font-weight: 900;
}

.ranking-item img {
    width: 90px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
    background: #e5e7eb;
}

.ranking-copy {
    display: grid;
    min-width: 0;
}

.ranking-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy small {
    color: var(--muted);
}

.page-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #7c2d12);
    background-size: cover;
    background-position: center;
}

.compact-hero {
    min-height: 300px;
}

.category-hero {
    min-height: 360px;
}

.filter-panel {
    max-width: 780px;
    margin-top: 28px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.filter-panel select {
    flex: 0 0 160px;
}

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

.category-overview {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 210px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.category-mosaic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.category-mosaic img {
    width: 100%;
    height: 100%;
    min-height: 105px;
    object-fit: cover;
}

.category-overview-copy {
    padding: 28px;
}

.category-overview-copy h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

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

.category-overview-copy span {
    color: var(--orange);
    font-weight: 800;
}

.detail-top {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-height: 64px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-section {
    padding-top: 34px;
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    cursor: pointer;
}

.player-overlay span {
    display: inline-flex;
    width: 74px;
    height: 74px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    border-radius: 50%;
    color: #111827;
    background: #ffffff;
    font-size: 30px;
}

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

.player-box.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-copy,
.detail-side {
    margin-top: 22px;
    border: 1px solid rgba(229, 231, 235, 0.84);
    border-radius: 20px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-side {
    position: sticky;
    top: 96px;
    align-self: start;
    margin-top: 0;
}

.detail-title-row {
    display: flex;
    gap: 20px;
    align-items: start;
    justify-content: space-between;
}

.detail-copy h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #374151;
    background: #f3f4f6;
    font-size: 14px;
}

.lead-text {
    color: #374151;
    font-size: 18px;
    font-weight: 600;
}

.text-panel {
    margin-top: 24px;
}

.text-panel h2,
.detail-side h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.text-panel p {
    margin: 0;
    color: #374151;
}

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

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

.side-list .ranking-item {
    grid-template-columns: 36px 80px minmax(0, 1fr);
    padding: 10px;
}

.side-list .ranking-item img {
    width: 80px;
    height: 56px;
}

.empty-state {
    display: none;
    margin-top: 28px;
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

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

.site-footer {
    padding-top: 54px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 38px;
}

.brand-footer .brand-text strong {
    color: #ffffff;
}

.footer-brand p {
    max-width: 560px;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: #d1d5db;
}

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

.footer-bottom {
    margin-top: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px;
    text-align: center;
    color: #9ca3af;
}

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

    .hero-content,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 58px 0 90px;
    }

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

    .search-card,
    .footer-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

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

    .filter-panel select {
        flex-basis: auto;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .section-block {
        padding: 44px 0;
    }

    .section-heading {
        display: grid;
    }

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

    .ranking-item {
        grid-template-columns: 38px 78px minmax(0, 1fr);
    }

    .ranking-item img {
        width: 78px;
        height: 56px;
    }

    .detail-title-row {
        display: grid;
    }
}

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

    .hero h1,
    .page-hero h1 {
        font-size: 36px;
    }
}
