:root {
    color-scheme: dark;
    --bg-deep: #020617;
    --bg-main: #07111f;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --border-blue: rgba(56, 189, 248, 0.18);
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --blue: #2563eb;
    --orange: #f97316;
    --text: #e5eefc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #07111f 38%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(59, 130, 246, 0.22);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.32);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong,
.footer-brand strong {
    font-size: 22px;
    letter-spacing: 0.04em;
}

.brand-text small {
    color: var(--cyan);
    font-size: 12px;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
    min-height: 42px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: white;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 260px;
    padding: 0 48px 0 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: white;
    font-size: 26px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-search input {
    width: 100%;
    padding: 0 16px;
}

.mobile-search button,
.primary-btn,
.ghost-btn,
.full-link,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.mobile-search button,
.primary-btn,
.search-page-form button {
    color: white;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
}

.mobile-search button {
    padding: 0 20px;
}

.mobile-nav {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.55);
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
}

.hero-track {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 80px max(24px, calc((100vw - 1180px) / 2)) 96px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.38;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at 70% 50%, rgba(34, 211, 238, 0.24), transparent 28rem);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: white;
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(46px, 8vw, 92px);
    line-height: 0.95;
}

.hero-content p {
    max-width: 700px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.9;
}

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

.hero-tags {
    margin: 24px 0 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    color: #c6f6ff;
    background: rgba(8, 47, 73, 0.45);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-info .primary-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.full-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.ghost-btn,
.full-link {
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
    display: block;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 68px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

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

.section-heading h2,
.panel-title h2,
.related-panel h2,
.content-card h2 {
    margin: 0;
    color: white;
    font-size: clamp(28px, 4vw, 42px);
}

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

.compact-heading {
    align-items: center;
}

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

.category-tile,
.category-card-large,
.rank-panel,
.content-card,
.related-panel,
.player-card,
.detail-poster,
.filter-bar,
.search-page-form {
    border: 1px solid var(--border-blue);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(23, 37, 84, 0.46));
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
}

.category-tile {
    min-height: 220px;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 22px 70px rgba(34, 211, 238, 0.15);
}

.category-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-tile strong,
.category-card-head strong {
    display: block;
    color: white;
    font-size: 22px;
}

.category-tile p,
.category-card-large p,
.site-footer p,
.content-card p {
    color: var(--muted);
    line-height: 1.8;
}

.category-tile small {
    display: grid;
    gap: 6px;
    color: var(--muted-2);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-blue);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.featured-grid .movie-cover {
    aspect-ratio: 16 / 10;
}

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

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

.cover-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88));
}

.play-chip,
.rank-badge {
    position: absolute;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
}

.play-chip {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 36px rgba(34, 211, 238, 0.35);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: white;
    font-size: 20px;
    line-height: 1.35;
}

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

.movie-card p {
    min-height: 58px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

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

.rank-panel,
.related-panel {
    position: sticky;
    top: 100px;
    padding: 24px;
}

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

.panel-title span {
    color: var(--orange);
    font-weight: 900;
    letter-spacing: 0.2em;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
    background: rgba(8, 47, 73, 0.55);
    transform: translateX(4px);
}

.mini-card img {
    width: 68px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mini-card strong {
    display: block;
    color: white;
    line-height: 1.4;
}

.mini-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted-2);
}

.full-link {
    width: 100%;
    margin-top: 20px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
    background:
        radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.16), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 58, 138, 0.4));
}

.page-hero-content,
.detail-hero > .breadcrumb,
.detail-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero-content {
    padding: 72px 0;
}

.page-hero h1 {
    font-size: clamp(42px, 7vw, 72px);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.85;
}

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

.category-card-large {
    padding: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-card-head span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.filter-bar,
.search-page-form {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
    width: 100%;
    padding: 0 18px;
}

.search-page-form {
    grid-template-columns: 1fr auto;
}

.secondary-filter {
    grid-template-columns: 180px 180px;
    justify-content: start;
}

.empty-state {
    display: none;
    padding: 52px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(56, 189, 248, 0.28);
    border-radius: var(--radius);
}

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

.detail-hero {
    padding: 34px 0 72px;
}

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

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

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

.detail-poster {
    overflow: hidden;
    padding: 10px;
}

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

.detail-info h1 {
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1;
}

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

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

.tag-row.large {
    margin-top: 18px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-large {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.35);
    font-size: 30px;
}

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

.content-card {
    padding: 28px;
}

.content-card h2,
.related-panel h2 {
    margin-bottom: 16px;
    font-size: 26px;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(56, 189, 248, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.94));
}

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

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    border-top: 1px solid rgba(56, 189, 248, 0.12);
    color: var(--muted-2);
    text-align: center;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 62px;
    }

    .hero-poster {
        width: min(320px, 78vw);
        transform: none;
    }

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

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

    .rank-panel,
    .related-panel {
        position: static;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero-carousel,
    .hero-track {
        min-height: 760px;
    }

    .hero-content h1 {
        font-size: clamp(38px, 13vw, 58px);
    }

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

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

    .section-heading {
        display: grid;
    }

    .movie-grid,
    .compact-grid,
    .archive-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .search-page-form,
    .secondary-filter {
        grid-template-columns: 1fr;
    }

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

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

    .footer-grid {
        gap: 24px;
    }
}
