* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --pink: #ec4899;
    --red: #ef4444;
    --dark: #111827;
    --radius: 1.25rem;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

html {
    scroll-behavior: smooth;
}

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

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

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

.nav-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
}

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-search,
.mobile-search,
.page-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.nav-search input,
.mobile-search input,
.page-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 11px 14px;
    background: transparent;
    color: var(--ink);
}

.nav-search button,
.mobile-search button,
.page-search button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    padding: 11px 16px;
    cursor: pointer;
}

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

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-track,
.hero-slide {
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
    pointer-events: none;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.16)), var(--hero-cover);
    background-size: cover;
    background-position: center;
}

.hero-slide::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 180px;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0), var(--bg));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 150px 0 120px;
}

.hero-label,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fb923c;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    margin: 16px 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.13);
    padding: 5px 10px;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 650;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover,
.category-card:hover,
.category-panel:hover,
.rank-row:hover {
    transform: translateY(-3px);
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.10);
}

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

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

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.hero-preview-section {
    position: relative;
    z-index: 5;
    margin-top: -78px;
}

.section {
    padding: 58px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.text-panel h2,
.site-footer h2 {
    margin: 0;
    line-height: 1.15;
}

.section-heading h2 {
    margin-top: 6px;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--orange-dark);
    background: #fff7ed;
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster,
.detail-poster,
.rank-thumb {
    position: relative;
    display: block;
    background-color: #1f2937;
    background-image: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.62)), var(--cover-url);
    background-size: cover;
    background-position: center;
}

.poster {
    aspect-ratio: 3 / 4;
}

.quality,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    border-radius: 999px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
}

.quality {
    right: 10px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-badge {
    left: 10px;
    background: rgba(17, 24, 39, 0.72);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-meta {
    color: var(--muted);
    font-size: 0.78rem;
}

.movie-card strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.7em;
    color: #111827;
    font-size: 1rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    color: var(--orange-dark);
    border-color: #fed7aa;
    background: #fff7ed;
}

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

.category-card,
.category-panel {
    display: block;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card {
    min-height: 148px;
    padding: 22px;
}

.category-card span,
.category-panel .kicker {
    color: var(--orange-dark);
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin-top: 12px;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 650;
}

.category-panel {
    overflow: hidden;
}

.category-panel-main {
    display: block;
    padding: 26px;
}

.category-panel-main h2 {
    margin: 8px 0;
    font-size: 1.45rem;
}

.category-panel-main p {
    margin: 0;
    color: var(--muted);
}

.category-panel-links {
    display: grid;
    gap: 1px;
    background: var(--line);
}

.category-panel-links a {
    padding: 12px 18px;
    background: #ffffff;
    color: #374151;
}

.page-main {
    padding-top: 34px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    padding: 62px;
    background: linear-gradient(135deg, #111827, #7c2d12 50%, #831843);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.slim-hero p,
.rank-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.page-hero h1 {
    margin-top: 8px;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.04em;
}

.page-search {
    width: min(560px, 100%);
    margin-top: 28px;
}

.page-search input {
    flex: 1;
    width: auto;
}

.filter-bar {
    margin-bottom: 22px;
}

.filter-bar input {
    width: min(560px, 100%);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 14px 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.large-filter input {
    width: min(760px, 100%);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 64px 1fr auto;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 18px;
    padding: 10px 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    font-weight: 900;
}

.rank-thumb {
    width: 54px;
    height: 72px;
    border-radius: 12px;
}

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

.rank-info strong {
    font-size: 1rem;
}

.rank-info span,
.rank-score {
    color: var(--muted);
    font-size: 0.86rem;
}

.rank-score {
    color: var(--orange-dark);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.28)), var(--detail-cover);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0 92px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.76);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-radius: 1.5rem;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
    margin-top: 12px;
    font-size: clamp(2.1rem, 5vw, 4.8rem);
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
}

.player-section h2 {
    margin-bottom: 18px;
    font-size: 1.8rem;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.28), rgba(17, 24, 39, 0.52));
    cursor: pointer;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.36);
    font-size: 2rem;
}

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

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.text-panel,
.info-grid {
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

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

.info-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.info-grid div {
    display: grid;
    gap: 4px;
    border-radius: 16px;
    padding: 16px;
    background: #f9fafb;
}

.info-grid span {
    color: var(--muted);
    font-size: 0.86rem;
}

.info-grid strong {
    color: var(--ink);
}

.site-footer {
    margin-top: 60px;
    color: #e5e7eb;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 36px;
    padding: 54px 0 38px;
}

.site-footer p {
    color: #d1d5db;
}

.footer-brand {
    color: #ffffff;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 18px 16px;
    text-align: center;
    color: #9ca3af;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 44px;
    height: 44px;
    display: none;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.28);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

.is-filtered-out {
    display: none !important;
}

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

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

@media (max-width: 820px) {
    .site-nav,
    .nav-search {
        display: none;
    }

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

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

    .mobile-search input {
        width: 100%;
        flex: 1;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 110px;
    }

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

    .category-grid,
    .category-panel-grid,
    .footer-grid,
    .detail-text,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

    .page-hero {
        padding: 36px 24px;
    }

    .detail-layout {
        grid-template-columns: 170px 1fr;
        gap: 20px;
    }
}

@media (max-width: 560px) {
    .nav-inner {
        height: 64px;
        gap: 14px;
    }

    .brand {
        font-size: 1.1rem;
    }

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

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

    .hero-content h1,
    .detail-copy h1 {
        letter-spacing: -0.03em;
    }

    .hero-preview-section {
        margin-top: -48px;
    }

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

    .detail-poster {
        width: 58%;
        max-width: 210px;
    }

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

    .rank-score {
        display: none;
    }
}
