:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --orange: #fb923c;
    --orange-strong: #f97316;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 22px;
    --container: min(1180px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 12%, rgba(249, 115, 22, 0.18), transparent 28%),
        radial-gradient(circle at 85% 16%, rgba(34, 211, 238, 0.14), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #111827 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange-strong), var(--cyan));
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.24);
}

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

.nav-link,
.category-strip a,
.footer-links a {
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(251, 146, 60, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 10px;
}

.category-strip {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.category-strip-inner {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 9px 0 12px;
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar {
    display: none;
}

.category-strip a {
    flex: 0 0 auto;
    font-size: 14px;
}

.category-strip a:hover,
.footer-links a:hover {
    color: var(--orange);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.2) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(251, 146, 60, 0.18), transparent 32%),
        linear-gradient(180deg, transparent 70%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
    position: relative;
    width: var(--container);
    margin: 0 auto;
    padding: 120px 0 140px;
    max-width: 760px;
    justify-self: center;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tag,
.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(251, 146, 60, 0.32);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(251, 146, 60, 0.12);
    font-size: 13px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-strong), var(--cyan));
    border-color: transparent;
    box-shadow: 0 14px 36px rgba(251, 146, 60, 0.26);
}

.btn.ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(-50%);
}

.hero-controls button {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
}

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

.hero-side-panel {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 96px;
    z-index: 6;
    width: min(320px, calc(100% - 48px));
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-side-panel span,
.eyebrow {
    display: inline-flex;
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-side-panel strong {
    display: block;
    margin: 8px 0 12px;
    font-size: 22px;
}

.hero-side-panel a {
    color: var(--cyan);
    font-weight: 700;
}

.quick-search {
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    margin-top: -36px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    overflow: hidden;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    color: var(--text);
    background: transparent;
    padding: 0 20px;
}

.search-box button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-strong), var(--cyan));
    padding: 0 24px;
    cursor: pointer;
    font-weight: 800;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-tags a {
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.section-block {
    padding: 58px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -0.04em;
}

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

.section-more {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.content-card,
.filter-panel,
.movie-card,
.horizontal-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.category-card,
.category-overview-card,
.content-card,
.filter-panel {
    border-radius: var(--radius);
}

.category-card {
    min-height: 220px;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.horizontal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 146, 60, 0.42);
}

.category-count,
.category-main-link span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.category-card h3,
.category-overview-card h2 {
    margin: 12px 0 8px;
    font-size: 22px;
}

.category-card p,
.category-overview-card p {
    color: var(--muted);
    margin: 0;
}

.category-samples {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
}

.category-samples a {
    color: var(--subtle);
}

.category-samples a:hover {
    color: var(--orange);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(34, 211, 238, 0.16));
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.76) 100%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 5px 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-strong), var(--cyan));
    font-size: 12px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    display: grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    color: #111827;
    background: #fed7aa;
}

.movie-info {
    padding: 15px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--subtle);
    font-size: 13px;
}

.movie-meta-line span,
.movie-meta-line a,
.movie-meta-line strong {
    display: inline-flex;
    align-items: center;
}

.movie-meta-line strong,
.card-foot strong {
    color: var(--orange);
}

.movie-card h3,
.horizontal-card h3 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

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

.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--subtle);
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 78px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.18), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(34, 211, 238, 0.16), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
}

.compact-hero {
    padding: 78px 0 64px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(140px, 1fr));
    gap: 14px;
}

.filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--subtle);
    font-size: 13px;
    font-weight: 700;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    padding: 0 12px;
}

.filter-grid option {
    color: #111827;
}

.filter-status {
    margin-top: 12px;
    color: var(--cyan);
    font-size: 14px;
}

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

.category-overview-card {
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 46px 86px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.list-index {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fed7aa, #67e8f9);
    font-weight: 900;
}

.horizontal-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.horizontal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 72px;
    border-bottom: 1px solid var(--line);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.84) 46%, rgba(2, 6, 23, 0.96) 100%), var(--detail-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.1);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 18px 0 30px;
    color: var(--subtle);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

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

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

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-meta-grid span {
    display: block;
    color: var(--subtle);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
}

.player-section {
    padding: 48px 0 26px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-panel video {
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(251, 146, 60, 0.28), transparent 30%),
        rgba(2, 6, 23, 0.42);
    cursor: pointer;
}

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

.play-round {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-strong), var(--cyan));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: 22px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 20px;
    padding: 24px 0;
}

.content-card {
    padding: 24px;
}

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

.content-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.meta-card dl {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.meta-card dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.meta-card dt {
    color: var(--subtle);
}

.meta-card dd {
    margin: 0;
    color: var(--text);
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.48);
}

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

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

.site-footer p,
.site-footer h3 {
    margin: 0 0 14px;
}

.site-footer p {
    color: var(--muted);
}

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

.footer-links.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-bottom {
    padding: 16px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--subtle);
    font-size: 14px;
}

[data-movie-card].is-hidden {
    display: none;
}

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

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

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 13px 14px;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding: 92px 0 126px;
    }

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

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

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

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

    .search-label {
        grid-column: 1 / -1;
    }

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

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

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

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

    .brand {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 520px;
    }

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

    .hero-actions,
    .quick-tags {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .quick-tags a {
        width: 100%;
    }

    .category-grid,
    .movie-grid,
    .all-movies-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 38px 70px 1fr;
        gap: 10px;
    }

    .horizontal-card p {
        display: none;
    }

    .player-panel {
        border-radius: 18px;
    }
}
