:root {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --blue: #38bdf8;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.16), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.12), transparent 26rem),
        linear-gradient(180deg, #0f172a 0%, #111827 52%, #1e293b 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
}

.nav-shell {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 20px;
    background: linear-gradient(90deg, #fb923c, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.26);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 10px 16px;
    border-radius: 12px;
    transition: 0.22s 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.92);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(30, 41, 59, 0.82);
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: opacity 0.72s ease, transform 1.1s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.24) 48%, rgba(15, 23, 42, 0.46) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-bottom: 92px;
    max-width: 1180px;
}

.hero-label,
.detail-label,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: #fff;
    background: rgba(249, 115, 22, 0.96);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 14px;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 26px;
    min-height: 52px;
    padding: 0 28px;
    color: #fff;
    background: var(--accent);
    border-radius: 16px;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.3);
    transition: 0.22s ease;
}

.primary-btn:hover {
    background: var(--accent-strong);
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    font-size: 34px;
    line-height: 1;
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 18px;
    height: 5px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    transition: 0.22s ease;
}

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

.search-band,
.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-band h2 {
    margin: 0 0 6px;
    font-size: 26px;
}

.search-band p,
.page-hero p,
.category-overview-head p,
.content-card p,
.detail-one-line,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

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

.quick-search input,
.filter-panel input,
.filter-panel select {
    min-height: 46px;
    color: #fff;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border);
    outline: none;
    border-radius: 14px;
    padding: 0 16px;
}

.quick-search input,
.filter-panel input {
    min-width: 280px;
}

.quick-search button {
    min-height: 46px;
    border: 0;
    color: #fff;
    background: var(--accent);
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
}

.section-block,
.page-main {
    padding-top: 58px;
}

.section-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 26px;
}

.section-heading span,
.page-hero span {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.26);
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.03em;
}

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

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

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

.movie-card {
    min-width: 0;
    background: rgba(30, 41, 59, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(249, 115, 22, 0.82);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.04));
    transition: 0.25s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 1;
}

.poster-meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #fff;
    font-size: 12px;
}

.poster-meta span:last-child {
    padding: 3px 8px;
    background: rgba(59, 130, 246, 0.82);
    border-radius: 8px;
}

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

.card-body strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.category-tile {
    position: relative;
    min-height: 174px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    overflow: hidden;
    padding: 20px;
    border-radius: 24px;
    background-position: center;
    background-size: cover;
    isolation: isolate;
    box-shadow: var(--shadow);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.28));
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile small {
    color: #cbd5e1;
    line-height: 1.6;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.rank-panel,
.ranking-column,
.category-overview-card,
.content-card {
    background: rgba(30, 41, 59, 0.62);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.42);
    transition: 0.2s ease;
}

.rank-item:hover {
    background: rgba(249, 115, 22, 0.14);
}

.rank-num {
    color: var(--accent);
    font-weight: 900;
    font-size: 20px;
    text-align: center;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-info strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info span {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero {
    display: grid;
    gap: 16px;
    padding: 54px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(56, 189, 248, 0.08)),
        rgba(30, 41, 59, 0.52);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.compact-page-hero {
    padding: 42px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #fb923c;
}

.category-overview-list {
    display: grid;
    gap: 26px;
    padding-top: 32px;
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
}

.category-overview-head a {
    height: max-content;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    border-radius: 14px;
    padding: 10px 16px;
    font-weight: 800;
}

.filter-panel {
    margin: 26px 0;
    flex-wrap: wrap;
    box-shadow: none;
}

.wide-filter input {
    flex: 1 1 360px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.detail-main {
    max-width: 1180px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 34px;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    margin: 0 0 20px;
    font-size: 18px;
}

.tag-row {
    margin-top: 18px;
}

.player-section {
    padding-top: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-overlay button {
    width: 86px;
    height: 86px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    border-radius: 999px;
    font-size: 36px;
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.36);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 28px;
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    white-space: pre-line;
}

.site-footer {
    margin-top: 74px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 14px;
}

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

.site-footer a,
.site-footer p {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.footer-bottom {
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

.filter-hidden {
    display: none !important;
}

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

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-slider {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .quick-search,
    .filter-panel,
    .category-overview-head {
        display: grid;
        align-items: stretch;
    }

    .quick-search input,
    .filter-panel input,
    .filter-panel select {
        min-width: 0;
        width: 100%;
    }

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

    .category-grid,
    .ranking-layout,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .compact-page-hero {
        padding: 28px;
        border-radius: 22px;
    }

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

    .detail-poster {
        max-width: 240px;
    }

    .detail-info h1 {
        font-size: 36px;
    }

    .player-box {
        border-radius: 20px;
    }

    .player-overlay button {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
}
