:root {
    --page-bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --brand: #f97316;
    --brand-dark: #ea580c;
    --brand-soft: #fff7ed;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--dark);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #f59e0b 50%, var(--accent));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text {
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

main {
    min-height: 70vh;
}

.hero-slider {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 28px auto 0;
    border-radius: 32px;
    overflow: hidden;
    background: var(--dark);
    box-shadow: var(--shadow);
}

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

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(650px, 100% - 48px);
    min-height: 620px;
    padding: 76px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: rgba(255, 247, 237, 0.95);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-content .tag {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero-actions,
.detail-info .primary-button {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-link,
.quick-search-form button,
.filter-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    border: 0;
    font-weight: 900;
    transition: all 0.2s ease;
}

.primary-button,
.quick-search-form button,
.filter-form button {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #f59e0b);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.24);
}

.primary-button:hover,
.quick-search-form button:hover,
.filter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.32);
}

.ghost-button {
    margin-left: 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-side-panel {
    position: absolute;
    top: 52px;
    right: 42px;
    z-index: 4;
    width: 270px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    display: grid;
    gap: 12px;
}

.hero-side-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 900;
}

.hero-side-card img {
    width: 58px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-controls {
    position: absolute;
    left: 56px;
    bottom: 36px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

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

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

.quick-search,
.section-block,
.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
}

.quick-search {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.quick-search-form,
.quick-entry-list,
.filter-panel,
.category-showcase,
.detail-copy,
.player-section,
.related-section,
.section-block {
    border-radius: var(--radius);
}

.quick-search-form,
.quick-entry-list,
.filter-panel {
    padding: 24px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.quick-search-form label {
    display: block;
    margin-bottom: 14px;
    color: var(--dark);
    font-size: 1.15rem;
    font-weight: 900;
}

.quick-search-form div,
.filter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.quick-search-form input,
.filter-form input,
.filter-form select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    outline: none;
}

.quick-search-form input:focus,
.filter-form input:focus,
.filter-form select:focus {
    border-color: rgba(249, 115, 22, 0.65);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.quick-entry-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-entry-list a {
    display: grid;
    place-items: center;
    min-height: 72px;
    border-radius: 18px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-weight: 900;
}

.section-block {
    padding: 32px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.section-heading,
.category-showcase-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading h2,
.category-showcase h2,
.detail-copy h2 {
    margin: 10px 0 0;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-heading p,
.category-showcase p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.9;
}

.section-link {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: var(--shadow);
}

.movie-poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.movie-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.76);
    font-weight: 900;
    font-size: 0.8rem;
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.movie-meta-line span,
.detail-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
}

.movie-card h3,
.rank-body h3,
.related-card h3 {
    margin: 12px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card p,
.rank-body p,
.related-card p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.75;
}

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

.category-tile {
    min-height: 138px;
    padding: 22px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e293b 45%, #f97316);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
    transition: transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile strong {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.65;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #0ea5e9);
    font-weight: 900;
}

.rank-poster img {
    width: 82px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
}

.page-hero,
.detail-hero {
    overflow: hidden;
    position: relative;
    border-radius: 30px;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.45), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #f97316 130%);
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 260px;
    padding: 48px;
    display: flex;
    align-items: center;
}

.small-hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.small-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.9;
}

.filter-form.wide-filter {
    grid-template-columns: 1fr 180px 160px auto;
}

.empty-result {
    display: none;
    margin: 26px 0 0;
    padding: 22px;
    border-radius: 16px;
    color: var(--muted);
    background: var(--surface-soft);
    text-align: center;
    font-weight: 800;
}

.empty-result.show {
    display: block;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 38px;
    align-items: center;
    padding: 42px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.9;
}

.detail-info .detail-meta span,
.detail-info .tag {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 800;
}

.player-section {
    background: #0b1120;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.28), rgba(15, 23, 42, 0.68));
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #f59e0b);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.38);
    font-size: 2rem;
    line-height: 1;
}

.play-cover strong {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

.detail-copy {
    display: grid;
    gap: 16px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.related-poster img {
    width: 92px;
    height: 122px;
    object-fit: cover;
    border-radius: 14px;
}

.category-showcase {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 32px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.site-footer {
    margin-top: 44px;
    padding: 42px 0;
    color: #cbd5e1;
    background: var(--dark);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand {
    color: #fff;
    font-size: 1.2rem;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

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

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

    .hero-side-panel {
        display: none;
    }

    .detail-hero {
        grid-template-columns: 280px 1fr;
    }

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

@media (max-width: 760px) {
    .site-header-inner {
        height: auto;
        min-height: 64px;
        padding: 10px 0;
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 12px;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        border-radius: 14px;
        background: var(--surface-soft);
    }

    .hero-slider {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-content {
        width: 100%;
        min-height: 560px;
        padding: 42px 24px 74px;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-controls {
        left: 24px;
        bottom: 24px;
    }

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

    .quick-search-form div,
    .filter-form,
    .filter-form.wide-filter {
        grid-template-columns: 1fr;
    }

    .section-block,
    .category-showcase,
    .small-hero,
    .detail-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .section-heading,
    .category-showcase-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .ranking-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: auto 74px 1fr;
        gap: 12px;
    }

    .rank-poster img {
        width: 74px;
        height: 96px;
    }

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

    .detail-poster img {
        width: min(320px, 100%);
        margin: 0 auto;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
