:root {
    --page-bg: #f8fafc;
    --panel-bg: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f1f5f9;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --radius-xl: 24px;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.13);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 44%, #f1f5f9 100%);
}

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: 100;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
}

.topbar {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

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

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

.nav-links > a,
.nav-dropdown > button {
    color: #e2e8f0;
    font-weight: 600;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 10px 2px;
    transition: color 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.active,
.nav-dropdown > button:hover {
    color: #fb923c;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 190px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    color: #e2e8f0;
    padding: 10px 12px;
    border-radius: 12px;
}

.dropdown-menu a:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ffffff;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.nav-search input::placeholder {
    color: #94a3b8;
}

.nav-search button,
.primary-btn,
.secondary-btn,
.section-link,
.category-card .card-action,
.player-start {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn,
.section-link,
.category-card .card-action,
.player-start {
    background: linear-gradient(135deg, var(--orange), #fb923c);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.28);
}

.nav-search button {
    padding: 8px 14px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

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

.primary-btn:hover,
.secondary-btn:hover,
.nav-search button:hover,
.section-link:hover,
.category-card:hover .card-action,
.player-start:hover {
    transform: translateY(-2px);
}

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

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

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

.mobile-panel a {
    display: block;
    padding: 12px 14px;
    color: #e2e8f0;
    border-radius: 12px;
}

.mobile-panel a:hover {
    background: rgba(51, 65, 85, 0.75);
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.18) 100%);
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 4;
    width: min(1240px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    align-items: center;
}

.hero-copy {
    max-width: 660px;
    padding-top: 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero h1,
.page-hero h1 {
    margin: 16px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.hero p,
.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 700;
}

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

.hero-panel {
    position: absolute;
    right: max(32px, calc((100vw - 1240px) / 2));
    bottom: 54px;
    z-index: 5;
    width: min(470px, calc(100% - 64px));
    display: grid;
    gap: 12px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(16px);
}

.hero-mini-card img {
    width: 72px;
    height: 92px;
    border-radius: 14px;
    object-fit: cover;
}

.hero-mini-card strong {
    display: block;
    margin: 8px 0 4px;
}

.hero-mini-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.55;
}

.hero-dots {
    position: absolute;
    left: max(32px, calc((100vw - 1240px) / 2));
    bottom: 50px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
    width: 70px;
    background: var(--orange);
}

.main-shell,
.detail-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.main-shell {
    padding: 48px 0 70px;
}

.content-section {
    margin-top: 54px;
}

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

.section-head h2,
.filter-panel h2,
.category-card h2,
.detail-block h2 {
    margin: 8px 0 8px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.14;
    letter-spacing: -0.035em;
}

.section-head p,
.filter-panel p,
.category-card p,
.detail-block p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link,
.category-card .card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--panel-bg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 34%, rgba(15, 23, 42, 0.82) 100%);
    opacity: 0.78;
}

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

.play-chip {
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.36);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(249, 115, 22, 0.96);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.28);
}

.card-body {
    padding: 16px;
}

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

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--soft);
}

.card-body h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--orange-dark);
}

.card-body p {
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

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

.card-tags span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #c2410c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: -30px;
    position: relative;
    z-index: 9;
}

.stat-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.stat-card strong {
    display: block;
    color: var(--orange);
    font-size: 34px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

.page-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 20%, rgba(249, 115, 22, 0.32), transparent 34%),
        linear-gradient(135deg, #020617 0%, #172554 50%, #0f172a 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 78px 0 68px;
}

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

.category-card {
    min-height: 260px;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.category-count {
    display: inline-flex;
    width: max-content;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 900;
}

.filter-panel {
    margin: 42px 0 28px;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-soft);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-top: 20px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    outline: 0;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-count {
    margin-top: 12px !important;
    font-weight: 800;
}

.detail-shell {
    padding: 34px 0 70px;
}

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

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

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

.player-card,
.detail-block,
.side-panel {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.video-frame {
    position: relative;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

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

.player-box {
    text-align: center;
}

.player-start {
    min-width: 112px;
    min-height: 52px;
    padding: 0 28px;
    font-size: 18px;
}

.player-box strong {
    display: block;
    margin-top: 14px;
    font-size: 20px;
}

.player-status {
    margin-top: 8px;
    color: #cbd5e1;
}

.detail-block {
    margin-top: 22px;
    padding: 28px;
}

.detail-block h1 {
    margin: 8px 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-block h2 {
    font-size: 26px;
    margin-top: 26px;
}

.detail-block p {
    font-size: 16px;
}

.detail-meta {
    margin: 0 0 18px;
}

.detail-meta span {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.side-panel {
    padding: 22px;
    position: sticky;
    top: 94px;
}

.side-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 76px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    color: #e2e8f0;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

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

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    background: var(--orange);
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.32);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.visible {
    opacity: 1;
    pointer-events: auto;
}

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

.empty-state {
    display: none;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--line);
}

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

@media (max-width: 1100px) {
    .nav-search input {
        width: 120px;
    }

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

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

    .side-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

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

    .hero {
        height: 660px;
    }

    .hero-panel {
        display: none;
    }

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

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

@media (max-width: 680px) {
    .topbar,
    .main-shell,
    .detail-shell,
    .page-hero-content,
    .footer-inner {
        width: min(100% - 24px, 1240px);
    }

    .hero-content {
        width: min(100% - 24px, 1240px);
    }

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

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

    .hero-dots {
        left: 12px;
        bottom: 24px;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 16px;
    }

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

    .detail-block,
    .filter-panel,
    .side-panel {
        padding: 18px;
        border-radius: 22px;
    }
}
