:root {
    --bg: #0a1929;
    --bg-soft: #102a43;
    --bg-card: rgba(16, 42, 67, 0.78);
    --bg-card-strong: rgba(36, 59, 83, 0.92);
    --text: #f8fafc;
    --muted: #b7c4d3;
    --subtle: #829ab1;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --danger: #ef4444;
    --line: rgba(130, 154, 177, 0.22);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 20% -10%, rgba(245, 158, 11, 0.22), transparent 36rem),
        radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.16), transparent 32rem),
        linear-gradient(180deg, #07111f 0%, var(--bg) 42%, #07111f 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 25, 41, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section,
.hero-inner,
.page-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.32);
}

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

.main-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--text);
    background: rgba(245, 158, 11, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(16, 42, 67, 0.9);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

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

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(16, 42, 67, 0.72);
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

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

.hero-slide {
    display: none;
    min-height: 660px;
    padding: 94px 0 64px;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    display: block;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.96) 0%, rgba(7, 17, 31, 0.82) 44%, rgba(7, 17, 31, 0.36) 100%),
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.24), transparent 28rem);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-strong);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-title p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    color: #111827;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 0 36px rgba(251, 191, 36, 0.28);
}

.btn.secondary {
    color: var(--text);
    background: rgba(16, 42, 67, 0.78);
    border: 1px solid var(--line);
    box-shadow: none;
}

.hero-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(16, 42, 67, 0.76);
    box-shadow: var(--shadow);
}

.hero-poster {
    min-height: 470px;
    background-size: cover;
    background-position: center;
}

.hero-card-body {
    padding: 22px;
}

.hero-card-body strong {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.section {
    padding: 66px 0 0;
}

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

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

.section-heading p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.08;
    background-color: #102a43;
    background-size: cover;
    background-position: center;
}

.poster::after,
.rank-cover::after,
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(7, 17, 31, 0.92));
}

.poster-year,
.poster-type {
    position: absolute;
    z-index: 1;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(7, 17, 31, 0.74);
    backdrop-filter: blur(10px);
}

.poster-year {
    left: 12px;
    color: var(--accent-strong);
}

.poster-type {
    right: 12px;
    color: var(--text);
}

.card-content {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
}

.card-meta span,
.detail-meta span {
    padding: 5px 8px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.34;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    color: var(--subtle);
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    background-size: cover;
    background-position: center;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.category-card > * {
    position: relative;
    z-index: 1;
}

.category-card h3 {
    margin: 82px 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(16, 42, 67, 0.72);
}

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

.rank-cover {
    position: relative;
    height: 92px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
}

.rank-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
}

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 24px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(16, 42, 67, 0.72);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 0 16px;
    background: rgba(7, 17, 31, 0.72);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.filter-tabs button {
    min-height: 38px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(16, 42, 67, 0.74);
    cursor: pointer;
}

.filter-tabs button.active,
.filter-tabs button:hover {
    color: #111827;
    border-color: transparent;
    background: var(--accent-strong);
}

.page-hero {
    padding: 74px 0 18px;
}

.detail-hero {
    padding: 48px 0 26px;
}

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

.detail-poster {
    min-height: 430px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 64px);
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.16), rgba(7, 17, 31, 0.76));
    cursor: pointer;
}

.play-cover.hidden {
    display: none;
}

.play-cover span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 128px;
    border: 2px solid rgba(251, 191, 36, 0.68);
    border-radius: 999px;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 0 52px rgba(251, 191, 36, 0.38);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    margin: 0;
    padding: 8px 12px;
    color: var(--muted);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.78);
    backdrop-filter: blur(10px);
}

.content-panel {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.content-panel article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(16, 42, 67, 0.7);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.9;
}

.side-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(16, 42, 67, 0.68);
}

.side-card h3 {
    margin: 0 0 14px;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    color: var(--muted);
    line-height: 1.5;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid var(--line);
    background: rgba(7, 17, 31, 0.88);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 30px 0;
}

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

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

.empty-state {
    display: none;
    padding: 32px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.empty-state.show {
    display: block;
}

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

    .hero-inner,
    .rank-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 430px;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .hero,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        padding: 70px 0 72px;
    }

    .hero-inner,
    .detail-head {
        grid-template-columns: 1fr;
    }

    .hero-card {
        display: none;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .section,
    .hero-inner,
    .page-shell {
        width: min(100% - 22px, var(--max));
    }

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

    .rank-item {
        grid-template-columns: 42px 64px minmax(0, 1fr);
    }

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

    .detail-poster {
        min-height: 360px;
    }

    .play-cover span {
        width: 104px;
        height: 104px;
    }
}
