:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(127, 29, 29, 0.38);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --radius: 18px;
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at 88% 12%, rgba(220, 38, 38, 0.18), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 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 {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(127, 29, 29, 0.45));
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.35);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(135deg, #fde68a, #f87171);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #d1d5db;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px 18px;
}

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

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

.hero-stage {
    position: relative;
    min-height: 72vh;
}

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

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

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

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 48%, rgba(127, 29, 29, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    min-height: 72vh;
    margin: 0 auto;
    padding: 86px 20px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 48px;
    align-items: center;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-text h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-text p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

.hero-tags,
.genre-row,
.meta-pills,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.genre-row span,
.meta-pills span,
.tag-row span,
.tag-cloud a {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

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

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 16px 36px rgba(220, 38, 38, 0.28);
}

.btn-ghost {
    color: #f8fafc;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(15, 23, 42, 0.68);
}

.hero-poster {
    display: block;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

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

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--amber), var(--red));
}

.content-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 54px 20px;
}

.intro-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 22px;
}

.intro-card,
.quick-search,
.prose-card,
.player-card,
.rank-panel,
.category-card-large,
.search-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.intro-card,
.quick-search,
.prose-card,
.player-card,
.rank-panel,
.category-card-body,
.search-panel {
    padding: 24px;
}

.intro-card h2,
.section-title h2,
.panel-title h2,
.player-title-row h2,
.prose-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.intro-card p,
.section-title p,
.prose-card p,
.category-card-body p,
.footer-column p,
.footer-brand p {
    color: var(--muted);
}

.quick-search label {
    display: block;
    margin-bottom: 12px;
    color: #fde68a;
    font-weight: 800;
}

.quick-search div,
.search-box {
    display: flex;
    gap: 10px;
}

.quick-search input,
.search-box input {
    width: 100%;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 12px 18px;
    outline: none;
}

.quick-search input:focus,
.search-box input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.section-title p {
    margin: 10px 0 0;
}

.section-more,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

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

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

.movie-badge,
.rating-badge {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    left: 12px;
    color: white;
    background: rgba(220, 38, 38, 0.88);
}

.rating-badge {
    right: 12px;
    color: #111827;
    background: #fbbf24;
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--soft);
    font-size: 13px;
}

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

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

.tag-row {
    gap: 6px;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 154px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: var(--panel);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 154px;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.66;
}

.category-tile span,
.category-tile strong {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 2;
}

.category-tile span {
    bottom: 42px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    bottom: 18px;
    color: #fde68a;
    font-size: 13px;
}

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

.panel-title {
    margin-bottom: 18px;
}

.panel-title span {
    color: #fbbf24;
    font-weight: 900;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 46px 62px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
    background: rgba(245, 158, 11, 0.09);
    border-color: rgba(245, 158, 11, 0.36);
}

.rank-no {
    color: #fbbf24;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 62px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info strong,
.rank-info em {
    display: block;
}

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

.rank-info em {
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    position: relative;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.2), transparent 28rem),
        linear-gradient(135deg, rgba(127, 29, 29, 0.32), rgba(15, 23, 42, 0.64));
}

.page-hero > div {
    max-width: var(--max);
    margin: 0 auto;
    padding: 74px 20px 58px;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

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

.category-card-large {
    overflow: hidden;
}

.category-card-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.category-card-cover img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.category-card-body span {
    color: #fbbf24;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.category-card-body h2 {
    margin: 8px 0 8px;
}

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

.feature-item a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.feature-item img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    opacity: 0.88;
}

.feature-item span,
.feature-item strong {
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 2;
}

.feature-item span {
    top: 12px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    color: #fde68a;
    font-size: 12px;
}

.feature-item strong {
    bottom: 12px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.search-box {
    margin-bottom: 18px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-row button {
    color: #d1d5db;
    padding: 8px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
    cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
    color: white;
    border-color: rgba(245, 158, 11, 0.6);
    background: rgba(245, 158, 11, 0.15);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
}

.detail-container {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 34px 20px 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--soft);
    margin-bottom: 28px;
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: var(--shadow);
}

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

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

.meta-pills,
.genre-row {
    margin-top: 16px;
}

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

.player-title-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
}

.player-title-row > span {
    color: #fde68a;
    font-weight: 900;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 18px 50px rgba(220, 38, 38, 0.38);
    font-size: 34px;
}

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

.prose-card {
    max-width: 930px;
}

.prose-card h2 {
    margin-top: 28px;
    margin-bottom: 10px;
}

.prose-card h2:first-child {
    margin-top: 0;
}

.prose-card p {
    font-size: 17px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.info-grid div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    color: #fbbf24;
    font-size: 13px;
}

.info-grid span {
    color: #e2e8f0;
    margin-top: 4px;
}

.tag-cloud {
    margin-top: 22px;
}

.site-footer {
    margin-top: 44px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.96));
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 46px 20px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-column h3 {
    margin: 0 0 12px;
    color: #fde68a;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-column a {
    color: var(--muted);
}

.footer-column a:hover {
    color: #fbbf24;
}

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

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

    .split-section,
    .intro-strip {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 280px;
    }

    .movie-grid,
    .compact-grid,
    .category-overview-grid,
    .rank-list-wide,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 560px) {
    .header-inner {
        padding-inline: 14px;
    }

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

    .hero,
    .hero-stage,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 62px 16px 74px;
    }

    .content-section,
    .page-hero > div,
    .detail-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .feature-strip,
    .category-overview-grid,
    .rank-list-wide,
    .footer-inner,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .quick-search div,
    .search-box,
    .section-title,
    .player-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .category-card-cover {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-card-cover img {
        height: 128px;
    }
}
