:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #152033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-100: #f1f5f9;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --rose: #fb7185;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: rgba(148, 163, 184, 0.28);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button, input, select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
    backdrop-filter: blur(18px);
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.42rem;
    letter-spacing: 0.01em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--slate-300);
    font-size: 0.76rem;
}

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

.nav-link {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--cyan);
    transform: translateY(-1px);
}

.nav-link-sub {
    color: #b7c4d8;
    font-size: 0.88rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    border-radius: 999px;
    background: #fff;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.2), transparent 32%), linear-gradient(135deg, #020617 0%, #12213a 52%, #0f172a 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 6% -110px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.13);
    filter: blur(15px);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.9)), var(--hero-cover);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.5fr);
    gap: 42px;
    align-items: center;
    padding: 92px 0 72px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(103, 232, 249, 0.32);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 47, 73, 0.42);
    font-size: 0.86rem;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 820px;
    font-size: clamp(2.35rem, 5vw, 5.1rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span {
    display: block;
    color: var(--cyan);
}

.hero p {
    max-width: 720px;
    color: #d8e3f0;
    font-size: 1.05rem;
    line-height: 1.9;
}

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

.button-primary,
.button-ghost,
.filter-button,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.filter-button,
.player-start {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
}

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

.button-primary:hover,
.button-ghost:hover,
.filter-button:hover,
.player-start:hover {
    transform: translateY(-2px);
}

.hero-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(14px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.hero-card-body strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.08rem;
}

.hero-card-body span {
    color: var(--slate-300);
    font-size: 0.9rem;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
    display: flex;
    width: min(620px, 100%);
    margin-top: 28px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(12px);
}

.hero-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: #fff;
    padding: 0 14px;
}

.hero-search input {
    color: #fff;
    border-color: transparent;
    background: transparent;
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

.main-section,
.page-hero,
.detail-main {
    padding: 62px 0 0;
}

.page-wrap {
    position: relative;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--slate-950);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    letter-spacing: -0.04em;
}

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

.section-heading a {
    color: var(--cyan-strong);
    font-weight: 900;
}

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

.movie-card,
.info-card,
.category-tile,
.rank-row,
.prose-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 58px rgba(15, 23, 42, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.card-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(59, 130, 246, 0.95));
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.22);
}

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

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

.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.card-meta span,
.detail-meta span,
.rank-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ff;
}

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

.movie-card h3 a:hover {
    color: var(--cyan-strong);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.35em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    transition: transform 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.tile-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.82)), var(--tile-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.35s ease;
}

.category-tile:hover .tile-image {
    transform: scale(1.05);
}

.tile-content {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
}

.tile-content strong {
    display: block;
    font-size: 1.55rem;
}

.tile-content em {
    display: block;
    margin-top: 8px;
    color: #dbeafe;
    font-style: normal;
    line-height: 1.6;
}

.tile-content small {
    display: inline-flex;
    margin-top: 14px;
    color: #a5f3fc;
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px auto;
    gap: 12px;
    margin: 28px 0 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow);
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 30px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-row img {
    width: 86px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
    background: var(--slate-800);
}

.rank-index {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--rose));
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

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

.detail-hero {
    color: #fff;
    background: linear-gradient(135deg, #020617, #12213a 54%, #0f172a);
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.72fr);
    gap: 32px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-poster-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38)), var(--poster);
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    min-height: 56px;
    padding: 0 30px;
    font-size: 1.05rem;
}

.detail-title h1 {
    color: #fff;
}

.detail-title p {
    color: #dbeafe;
}

.detail-meta {
    margin: 18px 0;
}

.detail-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
}

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

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
}

.prose-card,
.info-card {
    padding: 26px;
}

.prose-card h2,
.info-card h2 {
    margin: 0 0 16px;
    font-size: 1.45rem;
}

.prose-card p,
.info-card p {
    margin: 0 0 18px;
    color: #334155;
    line-height: 2;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.info-list span {
    color: var(--muted);
}

.info-list strong {
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #bdefff;
    font-size: 0.92rem;
}

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

.hidden {
    display: none !important;
}

@media (max-width: 1060px) {
    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 24px 60px rgba(2, 6, 23, 0.36);
    }

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

    .nav-toggle {
        display: block;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner,
    .page-wrap,
    .footer-inner,
    .footer-bottom,
    .detail-hero-inner,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-content {
        padding: 48px 0 82px;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.7rem);
    }

    .hero-search,
    .section-heading,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        display: grid;
    }

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

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

    .rank-row {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .rank-row img {
        width: 68px;
    }

    .rank-row .button-ghost {
        grid-column: 1 / -1;
    }

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

@media (max-width: 480px) {
    .brand-text strong {
        font-size: 1.12rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

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

    .detail-hero-inner {
        padding: 30px 0;
    }

    .prose-card,
    .info-card {
        padding: 20px;
    }
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0 28px;
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: var(--slate-900);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.05rem;
}

.site-footer p {
    margin: 14px 0 0;
    line-height: 1.8;
}

.footer-brand strong {
    color: #fff;
    font-size: 1.25rem;
}

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

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

.footer-bottom {
    padding: 22px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    font-size: 0.92rem;
}
