:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(34, 211, 238, 0.22);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.14);
    --blue: #2563eb;
    --pink: #ec4899;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #06121c;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.34);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: var(--cyan-soft);
}

.menu-button {
    display: none;
    color: #fff;
    background: var(--cyan-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.hero-shell {
    width: min(1320px, calc(100% - 32px));
    margin: 28px auto 0;
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.76)),
        linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(236, 72, 153, 0.08));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: center;
    padding: 70px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-media {
    position: relative;
    isolation: isolate;
}

.hero-media::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.26), rgba(236, 72, 153, 0.18));
    filter: blur(10px);
}

.hero-media img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    background: var(--cyan-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-title-text {
    margin: 18px 0 8px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h2 {
    margin: 10px 0 14px;
    color: #fff;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.08;
}

.hero-copy p,
.page-hero p,
.detail-info p {
    color: #cbd5e1;
    font-size: 18px;
    max-width: 720px;
}

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

.hero-tags span,
.tag-list span {
    color: #b6f4ff;
    background: rgba(8, 145, 178, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #06121c;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.28);
}

.ghost-button,
.section-link {
    color: #dffaff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--line-strong);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

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

.hero-controls button {
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.32) !important;
}

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

.page-main {
    padding: 34px 0 70px;
}

.page-section {
    margin-top: 42px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-strip {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 430px);
    gap: 22px;
    align-items: center;
    margin-top: 28px;
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-strip.in-page {
    width: 100%;
}

.search-strip p {
    margin: 4px 0 0;
    color: var(--muted);
}

.search-strip input {
    width: 100%;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 14px 16px;
}

.search-strip input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    transform: scale(1.04);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after,
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.92));
}

.category-tile:hover img,
.category-card:hover img {
    opacity: 0.34;
    transform: scale(1.12);
}

.category-tile span,
.category-card h2 {
    display: block;
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

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

.category-card {
    min-height: 240px;
    display: flex;
    align-items: end;
}

.category-card span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 28px 72px rgba(34, 211, 238, 0.18);
    transform: translateY(-6px);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: #06121c;
    background: rgba(34, 211, 238, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

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

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

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
    gap: 28px;
    align-items: start;
}

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

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

.wide-rank-list {
    grid-template-columns: repeat(2, 1fr);
}

.rank-row {
    display: grid;
    grid-template-columns: auto 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    border-color: var(--line-strong);
    transform: translateX(4px);
}

.rank-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-number {
    color: var(--cyan);
    font-size: 18px;
    font-weight: 900;
}

.rank-title {
    color: #fff;
    font-weight: 800;
}

.rank-score {
    color: #b6f4ff;
    font-size: 13px;
}

.page-hero {
    padding: 54px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.72)),
        radial-gradient(circle at 88% 20%, rgba(34, 211, 238, 0.2), transparent 28rem);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 30px;
    align-items: start;
}

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

.player-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    color: #06121c;
    background: linear-gradient(135deg, var(--cyan), #a7f3d0);
    border-radius: 999px;
    font-size: 28px;
    box-shadow: 0 22px 56px rgba(34, 211, 238, 0.32);
}

.player-overlay strong {
    font-size: 18px;
}

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

.detail-info {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(32px, 4vw, 52px);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.detail-meta div {
    padding: 14px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 800;
}

.content-panel {
    margin-top: 28px;
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.content-panel p {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
}

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

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0;
    color: var(--muted);
    font-size: 14px;
}

[data-card].is-hidden {
    display: none !important;
}

@media (max-width: 1040px) {
    .hero-slide,
    .detail-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

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

    .hero-slide {
        padding: 46px;
    }

    .hero-media img {
        max-height: 420px;
        aspect-ratio: 16 / 10;
    }

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

@media (max-width: 780px) {
    .container,
    .hero-shell {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .logo {
        font-size: 19px;
    }

    .menu-button {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: var(--panel-strong);
        border: 1px solid var(--line);
        border-radius: 18px;
    }

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

    .hero-slider {
        min-height: 820px;
        border-radius: 24px;
    }

    .hero-slide {
        gap: 26px;
        padding: 24px;
    }

    .hero-controls {
        bottom: 18px;
    }

    .search-strip,
    .section-heading,
    .footer-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .category-grid,
    .category-card-grid,
    .movie-grid,
    .side-grid,
    .wide-rank-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-hero,
    .content-panel,
    .detail-info {
        padding: 24px;
        border-radius: 22px;
    }
}

@media (max-width: 540px) {
    .hero-slider {
        min-height: 760px;
    }

    .hero-media img {
        max-height: 320px;
    }

    .category-grid,
    .category-card-grid,
    .movie-grid,
    .side-grid,
    .wide-rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: auto 48px 1fr;
    }

    .rank-score {
        grid-column: 3;
    }

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