:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #ef4444;
    --accent-2: #f97316;
    --accent-3: #facc15;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.17), transparent 34rem),
        radial-gradient(circle at 85% 12%, rgba(249, 115, 22, 0.14), transparent 31rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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 {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.32);
}

.brand-text {
    font-size: 22px;
}

.nav-menu,
.nav-categories {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    position: relative;
    color: var(--soft);
    font-size: 15px;
    transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
}

.nav-link.is-active::after {
    position: absolute;
    right: 0;
    bottom: -23px;
    left: 0;
    height: 2px;
    content: "";
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-categories {
    max-width: 430px;
    overflow: hidden;
}

.nav-categories .nav-link {
    white-space: nowrap;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #ffffff;
}

.mobile-menu {
    display: none;
    padding: 10px 18px 18px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-link {
    display: block;
    padding: 12px 8px;
    color: var(--soft);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.mobile-link.is-active {
    color: #ffffff;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.74) 43%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 44%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 110px 0 86px;
    gap: 42px;
}

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

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span,
.category-tile-body span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 660px;
    margin: 24px 0 0;
    color: var(--soft);
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin-top: 20px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.09);
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 36px rgba(239, 68, 68, 0.35);
}

.ghost-button,
.section-link {
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.category-strip {
    position: relative;
    z-index: 8;
    width: min(1280px, calc(100% - 32px));
    margin: -34px auto 0;
}

.category-strip-inner {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-strip a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.page-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 98px;
}

.content-section,
.filter-panel,
.category-overview-grid,
.ranking-list,
.detail-content,
.breadcrumb,
.detail-hero,
.player-section {
    width: min(1280px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

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

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

.section-heading h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-tile-body p,
.detail-info p,
.story-card p {
    margin: 10px 0 0;
    color: var(--soft);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(30, 41, 59, 0.84);
    transform: translateY(-5px);
}

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

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

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

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.8) 100%);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

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

.movie-meta-line,
.ranking-meta,
.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-line span,
.ranking-meta span,
.detail-meta-grid span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.09);
}

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

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

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

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

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    margin-top: 40px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.search-box {
    display: grid;
    gap: 8px;
    color: #ffffff;
    font-weight: 700;
}

.filter-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    outline: none;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.7);
}

.filter-input:focus {
    border-color: rgba(248, 113, 113, 0.72);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.11);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}

.filter-button.is-active {
    border-color: rgba(248, 113, 113, 0.5);
    color: #ffffff;
    background: rgba(239, 68, 68, 0.24);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    color: var(--soft);
    text-align: center;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    padding: 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 16% 20%, rgba(239, 68, 68, 0.3), transparent 24rem),
        radial-gradient(circle at 80% 28%, rgba(249, 115, 22, 0.25), transparent 22rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
}

.page-hero p {
    max-width: 720px;
    font-size: 18px;
}

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

.category-tile {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    border-color: rgba(248, 113, 113, 0.4);
    transform: translateY(-4px);
}

.category-tile-link {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 250px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 12px;
}

.category-cover-stack img {
    width: 100%;
    height: 100%;
    min-height: 105px;
    border-radius: 14px;
    object-fit: cover;
}

.category-tile-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px;
}

.category-tile-body h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.12;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 86px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-cover img {
    width: 86px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-number {
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.ranking-body h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
}

.ranking-body p {
    margin: 0 0 10px;
    color: var(--soft);
}

.heat-pill {
    padding: 9px 13px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.74), rgba(249, 115, 22, 0.68));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 22px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    margin-top: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 25% 18%, rgba(239, 68, 68, 0.24), transparent 28rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

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

.detail-info {
    align-self: center;
}

.detail-info h1 {
    font-size: clamp(32px, 5vw, 58px);
}

.detail-info p {
    max-width: 780px;
    font-size: 18px;
}

.detail-meta-grid {
    margin-top: 22px;
}

.detail-tags {
    margin-top: 22px;
}

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

.play-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.4);
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-top: 32px;
}

.story-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.story-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
}

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

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.4fr;
    gap: 36px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
}

.footer-shell p {
    max-width: 520px;
    color: var(--muted);
}

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

.footer-links a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

    body.nav-open .mobile-menu {
        display: block;
    }

    .hero {
        min-height: 690px;
        height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 118px;
        gap: 24px;
    }

    .hero-poster {
        width: min(220px, 64vw);
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

    .filter-panel,
    .detail-hero,
    .detail-content,
    .footer-shell,
    .category-tile-link {
        grid-template-columns: 1fr;
    }

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

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

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

    .ranking-item {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .ranking-cover img {
        width: 70px;
    }

    .ranking-number,
    .heat-pill {
        display: none;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-content,
    .content-section,
    .filter-panel,
    .category-overview-grid,
    .ranking-list,
    .detail-content,
    .breadcrumb,
    .detail-hero,
    .player-section {
        width: min(100% - 24px, 1280px);
    }

    .category-overview-grid,
    .movie-grid,
    .movie-grid-hot {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
    }

    .poster-link img {
        height: 100%;
        aspect-ratio: auto;
    }

    .category-strip {
        width: min(100% - 24px, 1280px);
    }
}
