:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #172033;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --cyan-light: #22d3ee;
    --blue: #2563eb;
    --orange: #f97316;
    --red: #ef4444;
    --white: #ffffff;
    --border: rgba(148, 163, 184, 0.22);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.18), transparent 34%), var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--cyan-light), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 15px;
    background: linear-gradient(135deg, var(--cyan-light), var(--blue));
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.38);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.active,
.mobile-nav a.active {
    color: var(--white);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(37, 99, 235, 0.9));
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.8);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

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

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.24));
}

.hero-content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: min(1180px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: center;
}

.hero-copy {
    max-width: 740px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 8px 14px;
    color: var(--cyan-light);
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--white);
}

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

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.24);
}

.btn-secondary {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: var(--cyan-light);
    border: 1px solid rgba(34, 211, 238, 0.26);
    background: rgba(6, 182, 212, 0.1);
}

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

.hero-poster {
    position: relative;
    min-height: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 450px;
    object-fit: cover;
    opacity: 1;
    transform: none;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    right: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--white);
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

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

.hero-dots button {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.section {
    padding: 64px 0;
}

.section.dark-band {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 64px max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.44));
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.section-head p,
.page-title p,
.category-card p,
.detail-copy p,
.movie-card p,
.ranking-item p {
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-year,
.card-region {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.card-year {
    left: 12px;
}

.card-region {
    right: 12px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 10px;
    color: var(--white);
    font-size: 18px;
    line-height: 1.3;
}

.card-body h3 a:hover,
.ranking-item h3 a:hover,
.breadcrumb a:hover {
    color: var(--cyan-light);
}

.card-body p {
    margin: 0 0 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span,
.inline-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #a5f3fc;
    font-size: 12px;
    background: rgba(6, 182, 212, 0.13);
}

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

.category-card {
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.46);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--white);
    font-size: 22px;
}

.category-card p {
    margin: 0 0 20px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    color: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.64);
    padding: 0 13px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 94px 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-rank {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    color: var(--white);
    border-radius: 999px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.ranking-cover {
    display: block;
    width: 92px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

.ranking-item h3 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 20px;
}

.ranking-item p {
    margin: 0 0 12px;
}

.page-title {
    padding: 48px 0 26px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 32px;
    padding: 36px 0 64px;
}

.player-section {
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.62));
}

.play-cover.hidden {
    display: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.36);
    font-size: 34px;
    transform: translateX(3px);
}

.detail-card,
.detail-copy,
.side-panel {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-copy {
    margin-top: 24px;
    padding: 28px;
}

.detail-copy h2,
.side-panel h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 24px;
}

.detail-copy p {
    margin: 0 0 18px;
}

.side-panel {
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

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

.meta-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--muted);
}

.meta-list strong {
    color: var(--white);
}

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

.search-empty {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 22px;
}

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

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

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

.footer-grid p {
    color: var(--muted);
}

.footer-grid h2 {
    color: var(--white);
    font-size: 18px;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .side-panel {
        position: static;
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-content {
        gap: 0;
    }

    .grid,
    .category-grid,
    .filter-panel,
    .footer-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
    }

    .ranking-item {
        grid-template-columns: 1fr;
    }

    .ranking-cover {
        width: 100%;
        max-width: 160px;
    }

    .detail-copy {
        padding: 20px;
    }
}
