:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(34, 211, 238, 0.16);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --orange: #fb923c;
    --green: #4ade80;
    --purple: #c084fc;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 82% 20%, rgba(37, 99, 235, 0.22), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    width: min(1240px, calc(100% - 28px));
    min-height: 72px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.45);
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover {
    color: white;
    background: rgba(34, 211, 238, 0.13);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 7px 10px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
}

.grid-glow {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(34, 211, 238, 0.65) 2px, rgba(34, 211, 238, 0.65) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(34, 211, 238, 0.55) 2px, rgba(34, 211, 238, 0.55) 4px);
    background-size: 54px 54px;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

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

.hero-bg,
.detail-bg,
.category-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-overlay,
.detail-shade,
.page-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.92)),
        linear-gradient(0deg, #020617 0%, transparent 40%, rgba(2, 6, 23, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1050px, calc(100% - 32px));
    margin-inline: auto;
    padding-top: 32px;
}

.hero-kicker,
.eyebrow {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 800px;
    margin: 16px 0 18px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, var(--cyan), #60a5fa, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 36px rgba(34, 211, 238, 0.12);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 23px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.68);
    color: #cffafe;
    font-size: 13px;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.secondary-btn,
.ghost-link,
.rank-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 14px 42px rgba(34, 211, 238, 0.28);
}

.secondary-btn,
.ghost-link {
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.62);
    color: #e0f2fe;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-link:hover,
.rank-play:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.38);
}

.hero-dot.is-active {
    background: var(--cyan);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.65);
}

.search-panel {
    margin-top: 34px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.55);
    padding: 0 14px;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #cbd5e1;
    padding: 7px 13px;
}

.filter-chip.is-active,
.filter-chip:hover {
    border-color: var(--cyan);
    color: white;
    background: rgba(34, 211, 238, 0.14);
}

.global-search-results {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.global-search-results a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(2, 6, 23, 0.5);
}

.content-section {
    padding-block: 48px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1;
}

.section-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(34, 211, 238, 0.13);
    color: var(--cyan);
}

.section-line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section-head-orange .section-icon {
    background: rgba(251, 146, 60, 0.14);
    color: var(--orange);
}

.section-head-green .section-icon {
    background: rgba(74, 222, 128, 0.14);
    color: var(--green);
}

.section-head-purple .section-icon {
    background: rgba(192, 132, 252, 0.14);
    color: var(--purple);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.12);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.92));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), 0 0 36px rgba(34, 211, 238, 0.1);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.15)),
        #0f172a;
}

.movie-card-large .poster-link {
    aspect-ratio: 21 / 10;
}

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

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

.play-dot,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    background: rgba(34, 211, 238, 0.9);
    color: #020617;
    font-weight: 900;
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    color: white;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

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

.card-body h3 {
    margin: 8px 0 8px;
    font-size: 19px;
    line-height: 1.28;
}

.card-body h3 a:hover,
.rank-info h2 a:hover,
.category-mini-links a:hover {
    color: var(--cyan);
}

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

.card-stats {
    margin-top: 14px;
    justify-content: space-between;
    color: #bae6fd;
}

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

.category-link-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.category-link-grid a,
.category-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    padding: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-link-grid a:hover,
.category-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
}

.category-link-grid strong,
.category-name {
    display: block;
    color: white;
    font-size: 18px;
    margin-bottom: 6px;
}

.category-link-grid span,
.category-desc {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.category-preview {
    margin-bottom: 44px;
}

.category-preview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.category-preview h3 {
    margin: 0;
    font-size: 26px;
}

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

.page-hero,
.detail-hero {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    display: grid;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.compact-hero {
    min-height: 280px;
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.2), transparent 26rem),
        linear-gradient(135deg, #020617, #0f172a 55%, #111827);
}

.page-hero-content,
.compact-hero .container-wrap {
    position: relative;
    z-index: 2;
    padding-block: 54px;
}

.page-hero h1,
.compact-hero h1,
.detail-info h1 {
    margin: 8px 0 12px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.page-hero p,
.compact-hero p {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
}

.category-card-main {
    display: grid;
    gap: 7px;
}

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

.category-mini-links {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.category-mini-links a {
    color: #cbd5e1;
    font-size: 14px;
}

.ranking-page-list {
    display: grid;
    gap: 14px;
    padding-block: 40px;
}

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

.rank-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.13);
    color: var(--cyan);
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

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

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.rank-info p {
    margin: 0 0 8px;
    color: #cbd5e1;
}

.rank-play {
    background: rgba(34, 211, 238, 0.13);
    color: #cffafe;
}

.detail-hero {
    min-height: 620px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-block: 38px 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #bae6fd;
    margin-bottom: 28px;
}

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

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-one-line {
    max-width: 860px;
    color: #cbd5e1;
    font-size: 20px;
}

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

.detail-meta span {
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.66);
}

.player-section {
    padding-block: 46px 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: black;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
    color: white;
}

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

.player-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 34px;
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
}

.player-note {
    margin: 12px 0 0;
    color: var(--muted);
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.text-card h2 {
    margin: 0 0 12px;
    color: #e0f2fe;
}

.text-card p {
    margin: 0;
    color: #cbd5e1;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
    padding: 28px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-brand strong {
    color: white;
    font-size: 18px;
}

.footer-brand p {
    margin: 6px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.is-filter-hidden {
    display: none !important;
}

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

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

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

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 66px;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        max-height: 72vh;
        overflow-y: auto;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .site-logo span:last-child {
        max-width: 220px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-carousel {
        min-height: 680px;
    }

    .hero-content h1 {
        font-size: 46px;
    }

    .movie-grid,
    .movie-grid-featured,
    .movie-grid-compact,
    .ranking-strip,
    .category-link-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .category-preview-head,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 44px 94px 1fr;
    }

    .rank-play {
        grid-column: 2 / -1;
    }

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

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

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

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

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }
}
