:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(34, 211, 238, 0.2);
    --line-strong: rgba(34, 211, 238, 0.38);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.15), transparent 32rem),
        radial-gradient(circle at 84% 18%, rgba(37, 99, 235, 0.24), transparent 34rem),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 46%, #0f172a 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.72));
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

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

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

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
    font-size: 15px;
}

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

.nav-link,
.mobile-link,
.quick-link {
    color: #d1d5db;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.quick-link:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: white;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: block;
}

.mobile-link {
    display: block;
    padding: 12px 8px;
    border-radius: 10px;
}

.mobile-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-link {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    transform: scale(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.06) 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 18px;
}

.eyebrow,
.page-hero span,
.section-heading span,
.panel-title span,
.detail-title-block span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero p {
    width: min(640px, 100%);
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1.7;
}

.hero-meta,
.card-meta,
.detail-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.detail-meta-list span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.primary-button,
.ghost-button,
.search-card button,
.filter-panel button,
.panel-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-card button,
.filter-panel button {
    min-height: 46px;
    padding: 0 24px;
    color: white;
    background: var(--cyan-strong);
    border: 1px solid var(--cyan-strong);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.25);
}

.ghost-button,
.panel-link,
.text-link {
    min-height: 46px;
    padding: 0 22px;
    color: var(--cyan);
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.54);
}

.primary-button:hover,
.ghost-button:hover,
.search-card button:hover,
.filter-panel button:hover,
.panel-link:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-search {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.search-card,
.filter-panel,
.page-hero,
.rank-panel,
.video-panel,
.side-card,
.detail-main,
.category-card-large,
.category-tile,
.movie-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.search-card {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr auto;
    gap: 16px;
    align-items: center;
    padding: 24px;
    border-radius: 24px;
}

.search-card span {
    color: var(--cyan);
    font-weight: 800;
}

.search-card h2 {
    margin: 4px 0 0;
    font-size: 24px;
}

.search-card input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.48);
    padding: 0 16px;
    outline: none;
}

.search-card input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.section-block {
    margin-top: 56px;
}

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

.section-heading h2,
.panel-title h2,
.detail-section h2,
.side-card h2,
.category-card-large h2 {
    margin: 12px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.category-card-large:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    background: rgba(15, 23, 42, 0.9);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 14rem),
        linear-gradient(135deg, rgba(30, 58, 138, 0.72), rgba(2, 6, 23, 0.9));
}

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

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

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.74));
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    font-size: 12px;
    font-weight: 800;
}

.card-content {
    padding: 18px;
}

.card-meta {
    margin-bottom: 10px;
    font-size: 13px;
}

.card-meta span {
    color: var(--muted);
}

.card-meta span + span::before {
    content: "·";
    margin-right: 10px;
    color: var(--cyan);
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

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

.movie-card p,
.rank-info p,
.category-card-large p,
.detail-section p,
.page-hero p,
.footer-brand p {
    color: var(--soft);
    line-height: 1.75;
}

.movie-card p {
    min-height: 74px;
    margin: 0 0 14px;
    font-size: 14px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 112px 1fr;
    min-height: 170px;
}

.movie-card-compact .poster-frame {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-compact .card-content {
    padding: 14px;
}

.movie-card-compact h3 {
    font-size: 17px;
}

.movie-card-compact p {
    min-height: auto;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 4px 9px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
    align-items: start;
}

.compact-heading {
    margin-top: 0;
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border-radius: 24px;
}

.panel-title h2 {
    font-size: 28px;
}

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

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

.ranking-list .rank-row {
    grid-template-columns: 70px 92px 1fr;
}

.rank-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(34, 211, 238, 0.18);
    border: 1px solid var(--line-strong);
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.88));
}

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

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

.rank-info p {
    margin: 0 0 8px;
    font-size: 13px;
}

.panel-link {
    width: 100%;
    margin-top: 18px;
}

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

.category-tile {
    display: grid;
    gap: 14px;
    min-height: 240px;
    padding: 16px;
    border-radius: 22px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.category-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.8);
}

.category-tile strong {
    font-size: 20px;
}

.category-tile em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.page-hero {
    padding: 82px 0 72px;
    border-width: 0 0 1px;
    border-radius: 0;
    background:
        radial-gradient(circle at 16% 12%, rgba(34, 211, 238, 0.18), transparent 25rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.5), rgba(15, 23, 42, 0.96));
    box-shadow: none;
}

.page-hero h1 {
    width: min(900px, 100%);
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px auto;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
}

.filter-panel-wide {
    grid-template-columns: 1fr 180px 180px auto;
}

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

.empty-state {
    display: none;
    padding: 34px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
}

.empty-state.show {
    display: block;
}

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

.category-list {
    display: grid;
    gap: 22px;
}

.category-card-large {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: center;
    padding: 20px;
    border-radius: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-preview img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.7);
}

.category-card-large h2 {
    font-size: 30px;
}

.text-link {
    width: fit-content;
    margin-top: 12px;
}

.detail-page {
    padding-top: 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.video-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 14px;
    color: white;
    border: 0;
    background: rgba(2, 6, 23, 0.32);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
}

.play-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.22), transparent 18rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.play-core {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--cyan-strong);
    box-shadow: 0 0 46px rgba(34, 211, 238, 0.45);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 32px;
    align-items: start;
}

.detail-main,
.side-card {
    padding: 28px;
    border-radius: 24px;
}

.detail-title-block h1 {
    margin: 18px 0 14px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
}

.detail-title-block p {
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta-list {
    margin: 22px 0;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    font-size: 28px;
}

.detail-section p {
    font-size: 16px;
}

.detail-tags {
    margin-top: 26px;
}

.detail-side {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 18px;
}

.detail-poster {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.88));
    box-shadow: var(--shadow);
}

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

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 14px;
    margin: 18px 0 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: white;
}

.related-block {
    margin-bottom: 28px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-brand p {
    width: min(520px, 100%);
    margin-top: 14px;
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
}

.site-footer a {
    color: var(--muted);
}

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

.footer-bottom {
    padding: 18px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(34, 211, 238, 0.12);
}

@media (max-width: 1080px) {
    .card-grid,
    .category-movies {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        height: 560px;
    }

    .hero-copy {
        padding: 0 18px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

    .search-card,
    .filter-panel,
    .filter-panel-wide {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-grid,
    .featured-grid,
    .small-grid,
    .search-grid,
    .category-movies,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        grid-template-columns: 104px 1fr;
    }

    .rank-row,
    .ranking-list .rank-row {
        grid-template-columns: 48px 72px 1fr;
        gap: 10px;
    }

    .rank-info p {
        display: none;
    }

    .category-card-large {
        grid-template-columns: 1fr;
    }

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

    .detail-main,
    .side-card {
        padding: 20px;
    }

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