:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: #111827;
    --card-2: #1e293b;
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    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(34, 211, 238, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(90deg, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.25);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.nav-search {
    width: 300px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    padding: 6px;
}

.nav-search input,
.mobile-search input,
.big-search input,
.filter-bar input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.big-search input::placeholder,
.filter-bar input::placeholder {
    color: var(--muted-2);
}

.nav-search button,
.mobile-search button,
.big-search button {
    border: 0;
    color: white;
    cursor: pointer;
    border-radius: 10px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #dbeafe;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    margin-left: auto;
}

.mobile-panel {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 8px;
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center;
    background-size: cover;
    transition: opacity 0.75s ease, transform 1s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide::after,
.detail-hero::after,
.page-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, #020617);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    padding: 124px 22px 130px;
    text-align: center;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-intro h1 {
    margin: 16px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #cffafe, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h2 {
    font-size: clamp(30px, 5vw, 56px);
}

.hero p,
.page-hero p,
.detail-one-line {
    max-width: 780px;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: clamp(17px, 2.2vw, 24px);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.18);
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(103, 232, 249, 0.28);
    backdrop-filter: blur(14px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(203, 213, 225, 0.45);
}

.hero-dot.is-active {
    width: 32px;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
}

.hero-category-strip {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 20px;
    width: min(1120px, calc(100% - 34px));
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
    overflow-x: auto;
}

.hero-category-strip a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.72);
    font-weight: 800;
    font-size: 13px;
}

.hero-category-strip a:hover {
    color: white;
    background: rgba(34, 211, 238, 0.22);
}

.page-shell,
.detail-shell {
    width: min(1240px, calc(100% - 34px));
    margin: 0 auto;
}

.page-shell {
    padding: 64px 0 40px;
}

.section {
    margin-bottom: 76px;
}

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

.section-head h2,
.story-section h2,
.player-section h2,
.site-footer h2 {
    margin: 8px 0 0;
    color: #f8fafc;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.02em;
}

.section-head a,
.text-link {
    color: #67e8f9;
    font-weight: 900;
}

.scroll-row {
    display: flex;
    gap: 22px;
    padding: 6px 4px 24px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    flex: 0 0 310px;
    scroll-snap-align: start;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
    box-shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.poster-year {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    color: white;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.poster-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.36);
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.card-tags {
    justify-content: flex-start;
    margin: 0 0 12px;
}

.movie-card h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.35;
}

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

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

.rank-section {
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.64);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
}

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

.rank-cover span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    font-size: 13px;
    font-weight: 900;
}

.rank-info h3 {
    margin: 6px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.rank-info h3 a:hover {
    color: var(--cyan);
}

.rank-info p,
.rank-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    align-items: center;
    padding: 42px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, #172554, #0f172a);
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin: 10px 0;
    font-size: clamp(28px, 4vw, 46px);
}

.search-panel p {
    color: #cbd5e1;
    line-height: 1.8;
}

.big-search {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(16px);
}

.big-search input {
    min-height: 48px;
    padding: 0 10px;
}

.big-search button {
    border-radius: 14px;
    padding: 0 24px;
    font-weight: 900;
}

.page-hero {
    position: relative;
    min-height: 46vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.2), transparent 25rem),
        linear-gradient(135deg, #0f172a, #020617);
    overflow: hidden;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    width: min(1040px, calc(100% - 34px));
    margin: 0 auto;
    padding: 116px 0 72px;
}

.small-hero,
.search-hero,
.rank-hero,
.category-hero {
    min-height: 42vh;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 310px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: var(--shadow);
}

.category-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    right: -50px;
    top: -50px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
    filter: blur(20px);
}

.category-card > span {
    position: relative;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 900;
}

.category-card h2 {
    position: relative;
    margin: 12px 0;
    font-size: 32px;
}

.category-card p {
    position: relative;
    color: var(--muted);
    line-height: 1.8;
}

.category-samples {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.category-samples a,
.filter-links a {
    display: inline-flex;
    color: #dbeafe;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 13px;
    font-weight: 800;
}

.filter-bar {
    position: sticky;
    top: 82px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
}

.filter-bar input {
    min-height: 46px;
    padding: 0 14px;
}

.filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.detail-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.detail-shell {
    position: relative;
    z-index: 3;
    padding: 106px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #cbd5e1;
    margin-bottom: 28px;
    font-size: 14px;
}

.breadcrumb a {
    color: #67e8f9;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.detail-intro h1 {
    margin-top: 14px;
    font-size: clamp(36px, 5vw, 70px);
}

.detail-intro .detail-tags {
    justify-content: flex-start;
}

.detail-intro .hero-actions {
    justify-content: flex-start;
}

.detail-content {
    padding-top: 40px;
}

.player-section,
.story-section {
    margin-bottom: 44px;
}

.player-card {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.18);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    color: white;
    background: #020617;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    transform: scale(1.04);
}

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

.player-cover strong,
.play-orb {
    position: relative;
    z-index: 2;
}

.play-orb {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 22px 60px rgba(37, 99, 235, 0.45);
    font-size: 32px;
}

.player-cover strong {
    display: block;
    font-size: 22px;
}

.player-cover.is-hidden {
    display: none;
}

.story-section {
    display: grid;
    gap: 14px;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.story-section p {
    margin: 0 0 18px;
    color: #cbd5e1;
    line-height: 2;
    font-size: 17px;
}

.detail-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 58px;
}

.detail-nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-radius: 18px;
    padding: 12px 18px;
    color: #e0f2fe;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-weight: 900;
}

.detail-nav-links a:hover {
    border-color: rgba(34, 211, 238, 0.36);
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
    width: min(1240px, calc(100% - 34px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

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

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

.site-footer h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

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

.footer-links a {
    color: var(--muted);
    font-weight: 700;
}

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

.footer-bottom {
    padding: 20px;
    text-align: center;
    color: var(--muted-2);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.is-filtered-out {
    display: none !important;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 82vh;
    }

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

    .hero-category-strip {
        justify-content: flex-start;
    }

    .section-head,
    .search-panel,
    .filter-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .section-head {
        display: grid;
    }

    .movie-grid,
    .compact-grid,
    .rank-grid,
    .large-rank,
    .category-grid,
    .footer-grid,
    .detail-layout,
    .detail-nav-links {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

    .filter-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        height: 62px;
        padding: 0 16px;
    }

    .brand {
        font-size: 19px;
    }

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

    .hero-content {
        text-align: left;
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-tags,
    .hero-actions {
        justify-content: flex-start;
    }

    .page-shell,
    .detail-shell {
        width: min(100% - 24px, 1240px);
    }

    .page-shell {
        padding-top: 44px;
    }

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

    .player-card {
        border-radius: 18px;
    }

    .play-orb {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .story-section,
    .rank-section,
    .search-panel {
        padding: 24px;
        border-radius: 24px;
    }
}
