:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --line: rgba(96, 165, 250, 0.22);
    --line-soft: rgba(148, 163, 184, 0.18);
    --primary: #38bdf8;
    --secondary: #22d3ee;
    --accent: #60a5fa;
    --warn: #facc15;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #08111f 52%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

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

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.28);
}

.logo-mark svg {
    width: 23px;
    height: 23px;
    fill: #ffffff;
}

.logo-text {
    font-size: 20px;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #dbeafe;
    font-size: 15px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: #dbeafe;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    flex: 0 1 300px;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.64);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.header-search input::placeholder {
    color: #94a3b8;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

main {
    flex: 1;
}

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

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

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

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

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.18) 54%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 70px 0;
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 12px;
    border: 1px solid rgba(96, 165, 250, 0.36);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(30, 64, 175, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 80px);
}

.hero-summary {
    max-width: 660px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.24);
}

.btn-ghost {
    color: #dbeafe;
    border-color: rgba(147, 197, 253, 0.3);
    background: rgba(15, 23, 42, 0.55);
}

.btn-ghost:hover {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(15, 23, 42, 0.86);
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 6px 11px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.5);
    font-size: 13px;
}

.hero-panel {
    position: absolute;
    right: max(28px, calc((100vw - var(--container)) / 2));
    bottom: 44px;
    z-index: 4;
    width: min(410px, calc(100% - 56px));
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel-title {
    margin: 0 0 12px;
    font-size: 15px;
    color: #bfdbfe;
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.hero-dot {
    position: relative;
    height: 74px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 0;
    background: #0f172a;
    cursor: pointer;
}

.hero-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.hero-dot.is-active img,
.hero-dot:hover img {
    opacity: 1;
    transform: scale(1.05);
}

.section {
    padding: 58px 0;
}

.section-tight {
    padding: 36px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(56, 189, 248, 0.48);
    box-shadow: 0 26px 58px rgba(2, 6, 23, 0.44);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.22), transparent 34%),
        #0f172a;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.92) 100%);
}

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
    font-size: 12px;
    font-weight: 700;
}

.rank-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-rating {
    position: absolute;
    z-index: 3;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fef3c7;
    background: rgba(2, 6, 23, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
}

.card-title a:hover {
    color: var(--primary);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.card-desc {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card {
    display: flex;
    min-height: 178px;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.26));
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
}

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

.category-card p {
    margin: 12px 0 0;
    color: var(--soft);
}

.category-arrow {
    margin-top: 18px;
    color: var(--primary);
    font-weight: 800;
}

.page-hero {
    padding: 66px 0 34px;
    border-bottom: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.22), transparent 28rem),
        radial-gradient(circle at 84% 10%, rgba(34, 211, 238, 0.15), transparent 24rem);
}

.page-hero h1 {
    max-width: 850px;
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--soft);
    font-size: 18px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
}

.toolbar input,
.search-box input {
    width: min(100%, 420px);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.56);
    outline: none;
}

.toolbar input:focus,
.search-box input:focus {
    border-color: rgba(56, 189, 248, 0.76);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--line-soft);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(14px) saturate(1.2);
    transform: scale(1.08);
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #93c5fd;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

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

.detail-lead {
    margin: 18px 0 0;
    max-width: 850px;
    color: #dbeafe;
    font-size: 18px;
}

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.34);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.76));
}

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

.play-button {
    position: relative;
    z-index: 5;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.08);
}

.play-button::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
    transform: translateX(4px);
}

.content-card {
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    padding: 26px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.22);
}

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

.content-card p {
    margin: 0;
    color: var(--soft);
}

.content-card p + p {
    margin-top: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.tag {
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    color: #bfdbfe;
    background: rgba(30, 64, 175, 0.18);
    font-size: 13px;
}

.search-box {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.search-results-note {
    color: var(--muted);
    margin-bottom: 18px;
}

.empty-state {
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    padding: 30px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 34px 0;
    color: #cbd5e1;
}

.footer-inner h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 16px 0;
    color: #64748b;
    font-size: 13px;
}

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

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

    .header-search {
        display: none;
    }
}

@media (max-width: 820px) {
    .header-inner {
        min-height: 64px;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 10px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border: 1px solid var(--line-soft);
        border-radius: 22px;
        padding: 12px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .site-nav a:hover,
    .site-nav a.is-active {
        background: rgba(37, 99, 235, 0.22);
        transform: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-panel {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(100% - 32px, var(--container));
        margin: -130px auto 34px;
    }

    .hero-thumbs {
        grid-template-columns: repeat(5, minmax(42px, 1fr));
    }

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

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

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

    .detail-poster {
        width: min(280px, 82vw);
    }

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

@media (max-width: 540px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

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

    .hero h1 {
        font-size: 38px;
    }

    .hero-summary,
    .page-hero p,
    .detail-lead {
        font-size: 16px;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-cards,
    .grid-wide,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        min-height: auto;
        font-size: 14px;
    }

    .card-desc {
        display: none;
    }

    .content-card {
        padding: 20px;
        border-radius: 22px;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}
