:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0e1a2c;
    --bg-card: rgba(15, 23, 42, 0.86);
    --bg-card-solid: #111c2f;
    --text: #f8fafc;
    --muted: #aeb9ca;
    --faint: #64748b;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --red: #f43f5e;
    --amber: #f59e0b;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -10%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 6%, rgba(244, 63, 94, 0.14), transparent 30rem),
        linear-gradient(180deg, #07111f 0%, #0b1220 42%, #090f1b 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 17, 31, 0.82);
    backdrop-filter: blur(18px);
}

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

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

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), #60a5fa 48%, #a855f7);
    color: #07111f;
    box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
}

.logo-text {
    font-size: 1.18rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 13px;
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.hero {
    position: relative;
    padding: 34px 0 26px;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 24px;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

.hero-art {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.06);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.95) 0%, rgba(7, 17, 31, 0.72) 42%, rgba(7, 17, 31, 0.36) 100%),
        linear-gradient(0deg, rgba(7, 17, 31, 0.94) 0%, transparent 48%);
}

.hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 70px clamp(26px, 5vw, 76px);
    max-width: 780px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #bff8ff;
    background: rgba(34, 211, 238, 0.1);
    font-size: 0.9rem;
}

.hero h1,
.hero h2 {
    margin: 20px 0 16px;
    font-size: clamp(2.5rem, 6vw, 5.1rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #d9e4f1;
    font-size: 1.08rem;
    line-height: 1.82;
}

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

.hero-tags span,
.tag-row span,
.meta-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.hero-side {
    position: relative;
    z-index: 1;
    align-self: end;
    margin: 0 30px 30px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
}

.hero-side img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
}

.hero-side h3 {
    margin: 16px 0 8px;
    font-size: 1.2rem;
}

.hero-side p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.62;
}

.hero-controls {
    position: absolute;
    left: clamp(26px, 5vw, 76px);
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
    width: 56px;
    background: var(--cyan);
}

.main-content {
    padding: 26px 0 72px;
}

.section {
    padding: 42px 0;
}

.section-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto;
    padding: clamp(22px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    box-shadow: var(--shadow);
}

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

.section-title h1,
.section-title h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -0.03em;
}

.section-title p {
    max-width: 720px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.34);
}

.movie-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-poster {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(7, 17, 31, 0.88));
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #07111f;
    background: rgba(103, 232, 249, 0.94);
    box-shadow: 0 10px 24px rgba(34, 211, 238, 0.32);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 14px;
}

.movie-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.movie-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-featured {
    display: grid;
}

.movie-card-featured .movie-card-link {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.movie-card-featured .movie-poster img {
    height: 100%;
    aspect-ratio: auto;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.24), transparent 10rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.84));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.28rem;
}

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin: 22px 0 30px;
}

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

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

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

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.66)),
        radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 18rem);
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 24px;
    border-radius: 999px;
    color: #07111f;
    background: linear-gradient(135deg, var(--cyan), #a5f3fc);
    font-weight: 900;
    box-shadow: 0 16px 46px rgba(34, 211, 238, 0.34);
}

.detail-card,
.text-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    padding: 22px;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.detail-title {
    margin: 24px 0 10px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-intro {
    max-width: 860px;
    margin: 0 0 18px;
    color: #dbe7f4;
    font-size: 1.05rem;
    line-height: 1.85;
}

.text-card h2,
.detail-card h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.text-card p,
.detail-card p {
    margin: 0;
    color: #d3deec;
    line-height: 1.9;
}

.detail-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.info-list {
    display: grid;
    gap: 12px;
    color: var(--muted);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.info-list strong {
    color: var(--text);
}

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

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

.ranking-row img {
    width: 74px;
    height: 104px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-row h2,
.ranking-row h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.ranking-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 900;
}

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

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

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

.footer-inner {
    padding: 42px 0 32px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 36px;
    margin: 28px 0;
}

.footer-grid h2 {
    font-size: 1rem;
    margin: 0 0 12px;
}

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

.footer-grid a,
.footer-bottom {
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--cyan);
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    font-size: 0.9rem;
}

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

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

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

    .hero-side {
        display: none;
    }
}

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(7, 17, 31, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        border-radius: 12px;
    }

    .hero-inner {
        min-height: 620px;
        border-radius: 26px;
    }

    .hero-copy {
        padding: 50px 24px 90px;
    }

    .hero-controls {
        left: 24px;
        bottom: 24px;
    }

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

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

    .ranking-row .btn {
        grid-column: 1 / -1;
    }
}

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

    .movie-grid,
    .movie-grid.featured-grid,
    .movie-grid.compact-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .movie-card-featured .movie-card-link {
        display: flex;
    }

    .section-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .section-title {
        display: block;
    }

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

    .tag-row span:nth-child(n+3) {
        display: none;
    }

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