:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5eefc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --pink: #f472b6;
    --gold: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.52);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 20% 8%, rgba(34, 211, 238, 0.18), transparent 24rem),
        radial-gradient(circle at 80% 18%, rgba(96, 165, 250, 0.16), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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.92), rgba(8, 47, 73, 0.64));
}

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

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(96, 165, 250, 0.32));
    color: var(--cyan);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.28);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 21px;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    font-weight: 700;
    position: relative;
    transition: color 0.25s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transition: right 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--cyan);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    right: 0;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    font-size: 22px;
}

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

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

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-cats a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
}

main {
    min-height: 60vh;
}

.hero {
    position: relative;
    height: min(780px, calc(100vh - 72px));
    min-height: 620px;
    overflow: hidden;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.62) 46%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 74px 22px 86px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 46px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    background: rgba(8, 47, 73, 0.36);
    color: #a5f3fc;
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 820px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.hero p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: #06121c;
    font-weight: 900;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border: 0;
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(34, 211, 238, 0.30);
}

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

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.hero-panel .panel-poster {
    height: 430px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
}

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

.hero-dots button {
    width: 44px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 22px 0;
}

.section.compact-top {
    padding-top: 28px;
}

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

.section-header h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.section-header p,
.page-title p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(15, 23, 42, 0.88);
}

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

.poster-link img {
    transition: transform 0.45s ease;
}

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

.score {
    position: absolute;
    top: 14px;
    right: 14px;
    min-width: 44px;
    padding: 6px 10px;
    text-align: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(90deg, #fde68a, #fbbf24);
    font-weight: 900;
}

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

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

.movie-card p {
    margin: 0;
    color: #aab8ca;
    line-height: 1.7;
    min-height: 58px;
}

.movie-meta-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #9db0c7;
    font-size: 13px;
}

.movie-meta-row span,
.detail-meta span {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.10);
    color: #a5f3fc;
    font-size: 12px;
    border: 1px solid rgba(34, 211, 238, 0.18);
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.20), transparent 12rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

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

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

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 22px 30px;
}

.page-title {
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 38px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 26rem),
        rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    padding: 0 16px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 68px 110px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

.rank-index {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(96, 165, 250, 0.20));
    color: var(--cyan);
    font-weight: 900;
    font-size: 20px;
}

.rank-thumb {
    width: 110px;
    height: 148px;
    border-radius: 18px;
    overflow: hidden;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
}

.detail-cover {
    height: 470px;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

.detail-title h1 {
    margin-top: 14px;
}

.detail-title .lead {
    max-width: 820px;
    font-size: 18px;
    color: #cbd5e1;
}

.player-wrap {
    max-width: 1280px;
    margin: 48px auto 0;
    padding: 0 22px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

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

.play-button {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(96, 165, 250, 0.92));
    color: #04111f;
    font-size: 36px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.24);
}

.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 22px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
}

.content-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 30px;
    background: rgba(15, 23, 42, 0.68);
}

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

.content-panel p {
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

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

.side-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
}

.side-card img {
    height: 96px;
    border-radius: 14px;
}

.side-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    max-width: 1280px;
    margin: 70px auto 0;
    padding: 0 22px 38px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.74);
}

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

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

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

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

.footer-links a {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    color: #cbd5e1;
}

.footer-bottom {
    padding: 22px 8px 0;
    text-align: center;
    color: #64748b;
}

.hidden-card {
    display: none !important;
}

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

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

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

    .hero-panel {
        display: none;
    }
}

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

    .menu-button {
        display: grid;
        place-items: center;
    }

    .hero {
        min-height: 650px;
    }

    .hero-content {
        padding-top: 56px;
    }

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

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

    .poster-link {
        height: 290px;
    }

    .rank-row {
        grid-template-columns: 52px 92px 1fr;
    }

    .rank-thumb {
        width: 92px;
        height: 122px;
    }
}

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

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

    .brand-icon {
        width: 36px;
        height: 36px;
    }

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

    .hero-content {
        padding: 52px 16px 86px;
    }

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

    .section,
    .page-hero,
    .player-wrap,
    .detail-content,
    .detail-hero,
    .site-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-title,
    .content-panel {
        padding: 24px;
        border-radius: 24px;
    }

    .detail-cover {
        height: 420px;
    }

    .section-header {
        display: grid;
    }
}
