* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --muted-dark: #94a3b8;
    --panel: rgba(255, 255, 255, 0.92);
    --line: rgba(148, 163, 184, 0.24);
    --dark: #0f172a;
    --dark-2: #1e293b;
    --accent: #f97316;
    --accent-2: #fb923c;
    --accent-soft: #ffedd5;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    color: #fff;
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.38);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

main {
    overflow: hidden;
}

.hero-shell {
    position: relative;
    min-height: 600px;
    background: linear-gradient(90deg, #0f172a, #1e293b 54%, #0f172a);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter: saturate(1.05);
}

.hero-bg {
    opacity: 0.26;
}

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 30%, rgba(249, 115, 22, 0.22), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72) 52%, rgba(15, 23, 42, 0.92));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 64px 0;
}

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

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-2);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 22px 0 0;
    color: #e2e8f0;
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.detail-meta strong,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.detail-meta strong {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #ef4444);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #9a3412;
    background: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags .tag {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
}

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

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

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.36);
}

.btn.ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: inherit;
}

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

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

.hero-dot.active {
    background: var(--accent);
}

.quick-search-section {
    position: relative;
    z-index: 8;
    width: min(900px, calc(100% - 32px));
    margin: -34px auto 0;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr 132px;
    gap: 12px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.quick-search input,
.filter-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: #fff;
    color: var(--ink);
}

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

.quick-search button {
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #ef4444);
}

.content-section,
.detail-layout,
.watch-section {
    width: min(1280px, calc(100% - 32px));
    margin: 56px auto;
}

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

.section-head h2,
.story-panel h2,
.side-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.section-more {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    color: #9a3412;
    background: var(--accent-soft);
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 24px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.score-pill {
    right: 10px;
}

.rank-badge {
    left: 10px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
}

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

.movie-card-title {
    display: block;
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
    line-height: 1.35;
}

.movie-card-title:hover {
    color: var(--accent);
}

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

.movie-card .movie-meta {
    gap: 6px;
    margin-top: 12px;
    color: var(--muted);
}

.movie-card .movie-meta span {
    min-height: 24px;
    padding: 2px 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
}

.movie-card .tag-row {
    margin-top: 12px;
}

.movie-card .tag {
    font-size: 12px;
}

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

.category-tile {
    min-height: 142px;
    padding: 22px;
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.38), transparent 38%),
        linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 950;
}

.category-tile small {
    display: block;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.page-hero {
    position: relative;
    padding: 76px 0;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(249, 115, 22, 0.32), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero > div {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.compact-page h1 {
    font-size: clamp(40px, 6vw, 68px);
}

.search-panel {
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 56px rgba(15, 23, 42, 0.08);
}

.filter-box {
    width: min(320px, 100%);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
    align-self: center;
}

.rank-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-line a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}

.rank-line a:hover {
    color: var(--accent);
}

.rank-line span:last-child {
    margin-left: auto;
    color: var(--accent);
    font-weight: 950;
}

.list-rank {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    font-weight: 950;
}

.rank-info p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    color: #fff;
    background: #0f172a;
    overflow: hidden;
}

.detail-backdrop {
    opacity: 0.24;
}

.detail-mask {
    background:
        radial-gradient(circle at 78% 24%, rgba(249, 115, 22, 0.22), transparent 36%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72) 60%, rgba(15, 23, 42, 0.96));
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 520px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: center;
    gap: 42px;
    padding: 52px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.detail-copy h1 {
    max-width: 860px;
}

.detail-one-line {
    max-width: 820px;
    margin: 18px 0 0;
    color: #e2e8f0;
    font-size: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.76));
    cursor: pointer;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 24px 50px rgba(249, 115, 22, 0.42);
    font-size: 28px;
}

.play-overlay strong {
    font-size: 20px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.story-panel,
.side-panel {
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 44px rgba(15, 23, 42, 0.08);
}

.story-panel h2,
.side-panel h2 {
    margin-bottom: 14px;
    font-size: 28px;
}

.story-panel h2:not(:first-child) {
    margin-top: 28px;
}

.story-panel p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    white-space: pre-line;
}

.side-panel dl {
    margin: 0;
}

.side-panel div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.side-panel div:last-child {
    border-bottom: 0;
}

.side-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.side-panel dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.site-footer {
    margin-top: 80px;
    padding: 54px 0 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 42px;
}

.footer-grid p {
    max-width: 440px;
    color: #94a3b8;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a:hover {
    color: var(--accent-2);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 14px;
}

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 44px 0 76px;
    }

    .hero-poster {
        width: min(280px, 78vw);
    }

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

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

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

    .filter-box {
        width: 100%;
    }

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

    .detail-poster {
        width: min(280px, 76vw);
    }

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

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

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
    }

    .brand {
        font-size: 19px;
    }

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

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

    .content-section,
    .detail-layout,
    .watch-section {
        width: min(100% - 24px, 1280px);
        margin: 38px auto;
    }

    .search-panel,
    .story-panel,
    .side-panel {
        padding: 18px;
        border-radius: 24px;
    }

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

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

    .movie-card-title {
        font-size: 15px;
    }

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

    .rank-item {
        grid-template-columns: 70px 1fr;
    }

    .rank-line a {
        font-size: 16px;
    }

    .detail-inner {
        min-height: auto;
        padding: 40px 0;
    }

    .play-icon {
        width: 66px;
        height: 66px;
        font-size: 22px;
    }
}
