:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(255, 255, 255, 0.10);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --blue: #2563eb;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.52);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 34rem),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 70%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.36);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
    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-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), #fb7185);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-text,
.footer-brand {
    font-size: 1.28rem;
    background: linear-gradient(90deg, #fde68a, #fb923c, #fef3c7);
    -webkit-background-clip: text;
    color: transparent;
}

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

.main-nav a,
.mobile-nav a {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    padding: 8px 0;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--amber-light);
    border-color: var(--amber-light);
}

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

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 12px 22px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.94);
}

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

main {
    position: relative;
    z-index: 1;
}

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

.hero-stage {
    position: relative;
    min-height: 720px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 430px);
    align-items: center;
    gap: 52px;
    padding: 92px max(24px, calc((100vw - 1240px) / 2)) 82px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.28;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.76) 48%, rgba(2, 6, 23, 0.84) 100%),
        radial-gradient(circle at 70% 42%, rgba(245, 158, 11, 0.25), transparent 28rem);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.28);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 24px 0 20px;
    font-size: clamp(2.8rem, 6vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    max-width: 820px;
}

.hero p {
    color: #dbeafe;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    line-height: 1.8;
    max-width: 720px;
}

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

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

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

.button-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.button-ghost {
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    height: 560px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px;
    height: 36%;
    border-radius: 24px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(18px);
}

.hero-controls button {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: transparent;
}

.hero-controls > button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
}

.hero-controls > button:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--amber-light);
}

.quick-search-section,
.section-block,
.page-hero,
.breadcrumb,
.detail-hero,
.player-section,
.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.quick-search-section {
    display: grid;
    grid-template-columns: minmax(240px, 0.5fr) minmax(300px, 1fr);
    align-items: center;
    gap: 24px;
    padding-top: 42px;
    padding-bottom: 12px;
}

.home-search {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.home-search input {
    flex: 1;
    min-width: 160px;
    color: #fff;
    border: 0;
    outline: 0;
    padding: 0 12px;
    background: transparent;
}

.home-search input::placeholder,
.filter-panel input::placeholder {
    color: #94a3b8;
}

.section-block {
    padding-top: 62px;
    padding-bottom: 28px;
}

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

.section-heading.compact {
    display: block;
    margin-bottom: 18px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-section h2 {
    margin: 10px 0 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
    color: #fcd34d;
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.34);
    background: var(--panel);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92));
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: 0.62;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile em {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0 20px;
}

.category-tile span {
    margin-top: 118px;
    font-size: 1.3rem;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.6;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.poster-link img {
    transition: transform 0.34s ease, opacity 0.34s ease;
}

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

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-size: 0.78rem;
    font-weight: 900;
}

.rank-badge {
    left: auto;
    right: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.movie-card-content {
    padding: 16px 16px 18px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-light);
}

.movie-card p {
    min-height: 4.8em;
    margin: 0;
    color: var(--soft);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.18);
    font-size: 0.76rem;
    font-weight: 700;
}

.ranking-strip {
    padding-bottom: 72px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.22s ease, background 0.22s ease;
}

.mini-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.mini-card img {
    width: 76px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    margin-bottom: 6px;
}

.mini-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.86rem;
}

.page-hero {
    padding-top: 72px;
    padding-bottom: 30px;
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

.simple-hero,
.category-hero,
.rankings-hero {
    position: relative;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.25fr));
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    outline: 0;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 12px;
}

.empty-result {
    display: none;
    padding: 22px;
    border-radius: var(--radius);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.26);
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.category-cover {
    min-height: 250px;
    overflow: hidden;
    border-radius: 18px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
}

.category-overview-card p,
.category-overview-card li {
    color: var(--soft);
    line-height: 1.7;
}

.category-overview-card ul {
    margin: 12px 0 16px;
    padding-left: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding-top: 36px;
    padding-bottom: 46px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow);
}

.detail-info {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.72));
    box-shadow: 0 22px 70px rgba(2, 6, 23, 0.36);
}

.detail-one-line {
    color: #dbeafe;
    font-size: 1.16rem;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #cbd5e1;
    margin-top: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
}

.player-section {
    padding-top: 28px;
    padding-bottom: 34px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    cursor: pointer;
    color: #fff;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.76));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-symbol {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-size: 2.1rem;
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.34);
}

.player-overlay strong {
    font-size: 1.2rem;
}

.content-section {
    padding-top: 24px;
    padding-bottom: 10px;
}

.content-section p {
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 1.05rem;
    line-height: 1.95;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.055);
}

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

.top-rank-card {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.top-rank-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.94));
}

.top-rank-card span,
.top-rank-card strong,
.top-rank-card em {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
}

.top-rank-card span {
    top: 22px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber-light);
    font-weight: 900;
}

.top-rank-card strong {
    bottom: 58px;
    font-size: 1.5rem;
}

.top-rank-card em {
    bottom: 24px;
    color: #cbd5e1;
    font-style: normal;
}

.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 32px;
}

.footer-inner p {
    max-width: 460px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-inner h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: var(--amber-light);
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 22px 28px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

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

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

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

    .menu-button {
        display: block;
    }

    .hero,
    .hero-stage {
        min-height: 780px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 72px;
    }

    .hero-poster {
        height: 360px;
        max-width: 280px;
        transform: none;
    }

    .quick-search-section,
    .detail-hero,
    .footer-inner,
    .category-overview-grid,
    .top-rank-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 620px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand-text {
        font-size: 1.02rem;
    }

    .hero,
    .hero-stage {
        min-height: 740px;
    }

    .hero-slide {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-search {
        border-radius: 22px;
        flex-direction: column;
    }

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

    .movie-grid,
    .category-grid,
    .ranking-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-info {
        padding: 22px;
    }

    .play-symbol {
        width: 70px;
        height: 70px;
    }
}
