:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c33;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --panel-deep: rgba(15, 23, 42, 0.94);
    --border: #26364f;
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft-text: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #06b6d4;
    --orange: #fb923c;
    --green: #4ade80;
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.08), transparent 32rem),
        linear-gradient(180deg, #0f172a 0%, #172033 48%, #0f172a 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-text {
    font-size: 1.45rem;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan-deep), #2563eb);
    color: #fff;
    font-size: 0.86rem;
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.24);
}

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

.nav-link,
.dropdown-button {
    color: var(--soft-text);
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 176px;
    background: #1e293b;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 14px;
    color: var(--soft-text);
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-link:hover {
    color: var(--cyan);
    background: #334155;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    background: var(--soft-text);
    border-radius: 4px;
}

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

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

.mobile-link {
    display: block;
    padding: 9px 4px;
    color: var(--soft-text);
}

.mobile-sub-link {
    padding-left: 18px;
    color: var(--muted);
}

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

.hero-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-panel {
    position: relative;
    overflow: hidden;
}

.hero-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.06);
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 58%);
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.86) 34%, rgba(15, 23, 42, 0.42) 68%, rgba(15, 23, 42, 0.08) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.64), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

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

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 16px 0 18px;
    color: #fff;
    font-size: clamp(2.6rem, 6vw, 4.25rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.hero p {
    margin: 0 0 28px;
    max-width: 660px;
    color: var(--soft-text);
    font-size: 1.2rem;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--cyan-deep);
    color: #fff;
    box-shadow: 0 14px 26px rgba(6, 182, 212, 0.24);
}

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

.btn-primary:hover {
    background: #0891b2;
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.82);
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 0.94);
}

.main-wrap,
.page-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.main-wrap {
    padding: 64px 0 16px;
}

.page-wrap {
    padding: 42px 0 16px;
}

.content-section {
    margin-bottom: 70px;
}

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

.section-heading h2,
.page-heading h1 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    line-height: 1.16;
}

.page-heading p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--soft-text);
}

.section-more {
    color: var(--cyan);
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(38, 54, 79, 0.78);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.86);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover {
    transform: translateY(-4px) scale(1.012);
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #172033;
}

.card-small .card-cover,
.grid-small .card-cover {
    aspect-ratio: 16 / 9;
}

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

.card-link:hover .card-cover img {
    transform: scale(1.09);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.05) 58%);
    opacity: 0.82;
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 4px 8px;
    border-radius: 7px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.badge-type {
    left: 12px;
    background: rgba(249, 115, 22, 0.9);
}

.badge-region {
    right: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.88);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.9);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.36;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #64748b;
    font-size: 0.78rem;
}

.card-meta span:last-child {
    min-width: 0;
    color: var(--cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-panel {
    padding: 30px;
    border: 1px solid rgba(38, 54, 79, 0.86);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.5);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 22px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.1)),
        rgba(15, 23, 42, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.52);
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(37, 99, 235, 0.16)),
        rgba(15, 23, 42, 0.36);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.2rem;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.compact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.compact-card a {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 16px;
    min-height: 114px;
    padding: 10px;
    border: 1px solid rgba(38, 54, 79, 0.8);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card a:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.62);
}

.compact-cover {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #172033;
}

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

.rank-number {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    font-weight: 800;
}

.compact-body h2 {
    margin: 4px 0 8px;
    color: #fff;
    font-size: 1.03rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-body p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-body span {
    color: var(--cyan);
    font-size: 0.82rem;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 160px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(38, 54, 79, 0.82);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.56);
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(71, 85, 105, 0.9);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    padding: 0 14px;
    outline: none;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--cyan-deep);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

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

.detail-panel,
.side-panel,
.player-panel {
    border: 1px solid rgba(38, 54, 79, 0.86);
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.58);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #030712;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #030712;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(3, 7, 18, 0.34);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(6, 182, 212, 0.18), transparent 34%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.24));
}

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

.player-button {
    position: relative;
    z-index: 2;
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.94);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 0 0 12px rgba(6, 182, 212, 0.12), 0 18px 34px rgba(0, 0, 0, 0.32);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
    background: #0891b2;
}

.detail-content {
    padding: 26px;
}

.detail-content h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.16;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.22);
    color: var(--cyan);
    font-size: 0.82rem;
}

.meta-pill.orange {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.24);
    color: var(--orange);
}

.detail-content p {
    color: var(--soft-text);
    margin: 0 0 16px;
}

.detail-content h2,
.side-panel h2 {
    margin: 26px 0 12px;
    color: #fff;
    font-size: 1.35rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.side-panel {
    padding: 22px;
}

.side-cover {
    overflow: hidden;
    border-radius: 16px;
    background: #172033;
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
}

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

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

.side-link {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.side-link:hover {
    border-color: rgba(34, 211, 238, 0.46);
    background: rgba(15, 23, 42, 0.68);
}

.side-link img {
    width: 86px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    background: #172033;
}

.side-link h3 {
    margin: 2px 0 6px;
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-link span {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(38, 54, 79, 0.92);
    background: rgba(15, 23, 42, 0.86);
}

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

.footer-grid p {
    max-width: 420px;
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

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

.footer-links a {
    color: var(--muted);
    font-size: 0.92rem;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 30px;
    border-top: 1px solid rgba(38, 54, 79, 0.78);
    color: #64748b;
    text-align: center;
    font-size: 0.88rem;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid rgba(38, 54, 79, 0.86);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.55);
    color: var(--soft-text);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

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

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

    .hero {
        height: 560px;
    }

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

    .hero-panel:nth-child(n + 2) {
        display: none;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.22));
    }

    .section-heading,
    .page-heading {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 10px;
    }

    .grid-large,
    .grid-medium,
    .grid-small,
    .category-grid,
    .compact-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .compact-card a {
        grid-template-columns: 118px minmax(0, 1fr);
    }
}

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

    .hero {
        height: 520px;
    }

    .main-wrap,
    .page-wrap,
    .nav-wrap,
    .mobile-panel,
    .footer-grid,
    .footer-bottom,
    .hero-content {
        width: min(100% - 24px, 1280px);
    }

    .card-body {
        padding: 14px;
    }

    .detail-content,
    .side-panel,
    .category-panel {
        padding: 18px;
    }

    .side-link {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .side-link img {
        width: 74px;
        height: 54px;
    }
}
