:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(34, 211, 238, 0.18);
    --border-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --gold: #facc15;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.9);
    border-bottom: 1px solid rgba(34, 211, 238, 0.16);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand {
    font-size: 22px;
}

.brand-mark,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #02111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.45);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #cbd5e1;
}

.desktop-nav > a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    padding: 8px 0;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > button {
    color: #ffffff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: -18px;
    width: 190px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
}

.dropdown-panel a:hover {
    background: rgba(34, 211, 238, 0.12);
    color: #ffffff;
}

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

.nav-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select,
.search-page-form input,
.search-page-form select {
    min-width: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    outline: none;
    transition: 0.2s ease;
}

.nav-search input {
    width: 240px;
    padding: 10px 12px;
}

.nav-search button,
.mobile-panel button,
.search-page-form button {
    border: 0;
    cursor: pointer;
    color: #031827;
    font-weight: 800;
    padding: 10px 15px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

input:focus,
select:focus {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--border-soft);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    padding: 8px 11px;
}

.mobile-panel {
    display: none;
    padding: 14px 22px 22px;
    border-top: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 10px 0;
    color: #cbd5e1;
}

.mobile-panel form {
    display: grid;
    gap: 10px;
}

.mobile-panel input {
    padding: 12px;
}

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

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    min-height: 620px;
    margin: 0 auto;
    padding: 90px 22px 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-content p:not(.eyebrow) {
    margin: 20px 0 0;
    max-width: 680px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.card-badge,
.card-score,
.tag-pill {
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-style: normal;
}

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

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

.primary-button {
    color: #031827;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 35px rgba(34, 211, 238, 0.28);
}

.ghost-button {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.56);
}

.ghost-button.small {
    min-height: 40px;
    padding: 0 15px;
    font-size: 14px;
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.rank-item:hover,
.category-card:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: 34px;
    bottom: 46px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.56);
    cursor: pointer;
    font-size: 28px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.quick-strip {
    max-width: 980px;
    margin: -35px auto 0;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
}

.quick-strip a {
    display: grid;
    place-items: center;
    min-height: 52px;
    border-radius: 16px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.72);
}

.section-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 22px 0;
}

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

.section-title span,
.section-title h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-title a {
    color: var(--cyan);
    font-weight: 800;
}

.compact-title {
    margin-bottom: 18px;
}

.compact-title span {
    font-size: 25px;
}

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

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

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

.cards-small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.cards-preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.22);
    transition: 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 22px 70px rgba(8, 145, 178, 0.18);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.compact-card .card-cover {
    aspect-ratio: 16 / 10;
}

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

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.02) 20%, rgba(2, 6, 23, 0.82) 100%);
}

.card-badge {
    position: absolute;
    left: 10px;
    top: 10px;
}

.card-score {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-color: rgba(250, 204, 21, 0.38);
    color: #fde68a;
    background: rgba(113, 63, 18, 0.58);
}

.card-info {
    display: grid;
    gap: 9px;
    padding: 15px;
}

.card-info strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-info em {
    min-height: 42px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    font-style: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    color: #64748b;
    font-size: 13px;
}

.band-section {
    margin-top: 76px;
    padding-bottom: 72px;
    background: rgba(15, 23, 42, 0.38);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(34, 211, 238, 0.48);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #02111f;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #22d3ee);
}

.rank-item img {
    width: 96px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rank-content strong,
.rank-content em,
.rank-content span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-content span {
    color: #64748b;
    font-size: 12px;
}

.glow-section {
    margin-top: 72px;
    padding-bottom: 72px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(30, 64, 175, 0.18));
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    transition: 0.22s ease;
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    filter: brightness(0.72) saturate(1.08);
    transition: transform 0.5s ease;
}

.category-card span {
    position: absolute;
    inset: auto 0 0;
    padding: 40px 16px 16px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.95));
}

.category-card strong,
.category-card em {
    display: block;
}

.category-card strong {
    font-size: 20px;
    font-weight: 950;
}

.category-card em {
    margin-top: 6px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

.page-hero {
    position: relative;
    max-width: 1280px;
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 32px;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.32));
    box-shadow: var(--shadow);
}

.small-hero {
    padding: 58px 36px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

.rank-hero {
    min-height: 420px;
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    align-items: center;
    gap: 34px;
    padding: 36px;
}

.rank-hero img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 24px;
}

.category-overview {
    display: grid;
    gap: 24px;
}

.category-overview-card,
.content-card,
.detail-info,
.player-card,
.side-sticky,
.filter-panel,
.search-page-form {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.66);
    border-radius: 24px;
    box-shadow: 0 16px 55px rgba(2, 6, 23, 0.2);
}

.category-overview-card {
    padding: 22px;
}

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

.category-overview h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 950;
}

.category-overview p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel,
.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    padding: 16px;
    margin-bottom: 22px;
}

.search-page-form {
    grid-template-columns: minmax(0, 1fr) 180px 120px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input,
.search-page-form select {
    min-height: 46px;
    padding: 0 14px;
}

.search-status {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 800;
}

.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 22px 0;
}

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

.breadcrumb a {
    color: #a5f3fc;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.78fr);
    gap: 28px;
    align-items: start;
}

.detail-main {
    min-width: 0;
}

.player-card {
    padding: 12px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: #031827;
    font-size: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 48px rgba(34, 211, 238, 0.52);
}

.detail-info {
    margin-top: 20px;
    padding: 24px;
}

.detail-info h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 18px;
}

.detail-meta {
    color: #cbd5e1;
    margin-bottom: 18px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.tag-pill.muted {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.72);
}

.content-card {
    padding: 22px;
    margin-top: 16px;
}

.content-card h2,
.side-sticky h2,
.site-footer h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 950;
}

.content-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
    white-space: pre-line;
}

.detail-side {
    min-width: 0;
}

.side-sticky {
    position: sticky;
    top: 90px;
    padding: 18px;
}

.side-related {
    display: grid;
    gap: 14px;
}

.side-related .movie-card .card-info em {
    display: none;
}

.side-related .movie-card .card-info {
    padding: 12px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid rgba(34, 211, 238, 0.16);
    background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 30px;
}

.footer-brand {
    font-size: 20px;
    margin-bottom: 14px;
}

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

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 32px;
    color: #64748b;
}

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

@media (max-width: 1100px) {
    .cards-large,
    .cards-medium,
    .cards-small,
    .cards-preview,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-section,
    .detail-grid,
    .rank-hero {
        grid-template-columns: 1fr;
    }

    .rank-hero img {
        height: 280px;
    }
}

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

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

    .nav-shell {
        height: 62px;
        padding: 0 16px;
    }

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

    .hero-content {
        padding: 80px 18px 115px;
    }

    .hero-controls {
        right: 18px;
        bottom: 36px;
    }

    .hero-dots {
        bottom: 44px;
    }

    .quick-strip {
        grid-template-columns: repeat(2, 1fr);
        margin: -26px 16px 0;
    }

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

    .section-shell,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .small-hero,
    .rank-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding: 32px 20px;
        border-radius: 24px;
    }

    .filter-panel,
    .search-page-form,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .side-sticky {
        position: static;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 19px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
    }

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

    .hero-content p:not(.eyebrow) {
        font-size: 16px;
    }

    .hero-actions,
    .section-title,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .cards-large,
    .cards-medium,
    .cards-small,
    .cards-preview,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item img {
        width: 78px;
        height: 62px;
    }
}
