:root {
    --page-bg: #020617;
    --panel-bg: #0f172a;
    --panel-soft: #111c32;
    --card-bg: #1e293b;
    --card-deep: #0f172a;
    --line: #1f2a44;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #0891b2;
    --accent-light: #22d3ee;
    --accent-soft: rgba(8, 145, 178, 0.18);
    --danger: #f97316;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    --max-width: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
        radial-gradient(circle at 75% 0%, rgba(30, 41, 59, 0.7), transparent 30rem),
        var(--page-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell,
.footer-shell,
.page-shell {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    font-size: 14px;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.38);
}

.brand-text {
    font-size: 21px;
    color: white;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted-strong);
}

.desktop-nav > a,
.nav-dropdown > button {
    color: var(--muted-strong);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 210px;
    padding: 8px;
    background: #111827;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a,
.mobile-nav a,
.footer-links a {
    display: block;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: rgba(148, 163, 184, 0.12);
    color: white;
}

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

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--muted-strong);
}

.mobile-nav {
    display: none;
    padding: 12px 18px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav a {
    padding: 10px 0;
}

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

.hero-track,
.hero-slide,
.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

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

.hero-overlay-bottom {
    background: linear-gradient(to top, #020617 2%, rgba(2, 6, 23, 0.82) 32%, transparent 80%);
}

.hero-overlay-side {
    background: linear-gradient(to right, #020617 5%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18) 70%, rgba(2, 6, 23, 0.72));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--max-width), calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 92px;
    max-width: var(--max-width);
}

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 14px;
}

.hero-meta a,
.card-meta a,
.detail-meta a {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-weight: 700;
}

.hero h1 {
    width: min(760px, 100%);
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    width: min(720px, 100%);
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.quick-search,
.global-search-panel form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.primary-button,
.ghost-button,
.quick-search button,
.global-search-panel button,
.filter-panel button,
.category-preview-head a,
.category-enter,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.quick-search button,
.global-search-panel button,
.filter-panel button {
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    box-shadow: 0 14px 34px rgba(8, 145, 178, 0.32);
}

.primary-button:hover,
.quick-search button:hover,
.global-search-panel button:hover,
.filter-panel button:hover {
    transform: translateY(-1px);
    background: #06b6d4;
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.42);
}

.ghost-button {
    padding: 12px 24px;
    color: white;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.ghost-button:hover {
    background: rgba(30, 41, 59, 0.94);
}

.primary-button.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-1px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - var(--max-width)) / 2));
    bottom: 42px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #475569;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-shell,
.page-top {
    padding-top: 58px;
    padding-bottom: 72px;
}

.home-shell {
    display: grid;
    gap: 84px;
}

.search-strip,
.panel-section,
.detail-panel,
.side-card,
.category-preview-card,
.global-search-panel,
.filter-panel,
.page-hero,
.category-card-large {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.search-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
    gap: 28px;
    align-items: center;
    padding: clamp(24px, 4vw, 44px);
}

.search-strip h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.2;
}

.search-strip p,
.section-heading p,
.page-hero p,
.category-preview-head p,
.category-card-main p,
.side-card p,
.site-footer p {
    margin: 0;
    color: var(--muted);
}

.quick-search input,
.global-search-panel input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.78);
    color: white;
    outline: none;
    padding: 0 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.global-search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.quick-search input {
    flex: 1 1 220px;
}

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

.section-heading > div {
    display: grid;
    gap: 6px;
}

.section-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-light);
    font-weight: 900;
}

.section-heading h2,
.page-hero h1,
.category-card-main h2 {
    margin: 0;
    color: white;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.section-link,
.category-preview-head a,
.category-enter {
    color: var(--accent-light);
    background: rgba(8, 145, 178, 0.12);
    padding: 10px 16px;
}

.section-link:hover,
.category-preview-head a:hover,
.category-enter:hover {
    background: rgba(8, 145, 178, 0.24);
    color: white;
}

.panel-section {
    padding: clamp(24px, 4vw, 44px);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    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.4);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
}

.poster-link,
.poster-shell,
.related-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.22), transparent 42%),
        linear-gradient(145deg, #0f172a, #020617);
}

.poster-shell {
    aspect-ratio: 16 / 10;
}

.poster-image,
.hero-image {
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.35s ease;
}

.poster-image.is-missing,
.hero-image.is-missing {
    opacity: 0;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--muted-strong);
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.movie-card:hover .poster-image {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.74), transparent 55%);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.88);
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.9);
    color: white;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-badge,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
}

.duration-badge {
    right: 12px;
    top: 12px;
    padding: 4px 10px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f97316, #eab308);
}

.card-body {
    padding: 18px;
}

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

.card-meta {
    gap: 8px;
    font-size: 12px;
    margin-bottom: 10px;
}

.card-meta a {
    padding: 3px 8px;
    background: rgba(8, 145, 178, 0.18);
    color: var(--accent-light);
}

.movie-card h2 {
    margin: 0 0 10px;
    color: white;
    font-size: 18px;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card h2 a:hover {
    color: var(--accent-light);
}

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

.movie-card-compact p {
    display: none;
}

.tag-line {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-preview-grid,
.category-list-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.category-preview-head h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card-large {
    position: relative;
    overflow: hidden;
}

.category-card-main {
    position: relative;
    display: block;
    min-height: 210px;
    padding: 32px;
}

.category-glow {
    position: absolute;
    right: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
    filter: blur(3px);
}

.category-card-main p {
    width: min(460px, 100%);
    margin: 14px 0 28px;
}

.category-samples {
    display: grid;
    gap: 10px;
    padding: 0 32px 30px;
}

.category-samples a {
    color: var(--muted-strong);
}

.category-samples a:hover {
    color: var(--accent-light);
}

.page-hero {
    padding: clamp(28px, 5vw, 54px);
    margin-bottom: 28px;
}

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

.compact-hero::after {
    content: "";
    position: absolute;
    right: -130px;
    top: -140px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.14);
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 180px 180px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted-strong);
    font-size: 13px;
}

.filter-panel button {
    min-height: 46px;
    border-radius: 14px;
}

.global-search-panel {
    padding: 22px;
    margin-bottom: 28px;
}

.global-search-panel input {
    flex: 1 1 260px;
}

.detail-page {
    padding-bottom: 90px;
}

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

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: black;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.big-play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    background: rgba(8, 145, 178, 0.92);
    color: white;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(8, 145, 178, 0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.big-play-button:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.player-card.is-playing .big-play-button {
    opacity: 0;
    pointer-events: none;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--muted-strong);
    font-size: 13px;
}

.player-card.is-playing .player-status {
    display: none;
}

.detail-panel,
.side-card {
    padding: clamp(22px, 4vw, 34px);
}

.detail-panel h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.16;
}

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

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.tag-cloud span {
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.1);
    font-size: 13px;
}

.text-block {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 24px;
}

.text-block h2,
.side-card h2,
.footer-links h2 {
    margin: 0 0 14px;
    color: white;
}

.text-block p {
    color: var(--muted-strong);
    margin: 0 0 14px;
}

.lead-text {
    color: var(--accent-light) !important;
    font-weight: 800;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-cover {
    border-radius: 12px;
    aspect-ratio: 16 / 10;
}

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

.related-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.related-info strong {
    color: white;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item:hover strong {
    color: var(--accent-light);
}

.related-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.accent-card {
    background: linear-gradient(145deg, rgba(8, 47, 73, 0.94), rgba(15, 23, 42, 0.98));
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.92);
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(180px, 0.5fr));
    gap: 36px;
    padding: 44px 0;
}

.footer-brand p {
    margin-top: 16px;
    max-width: 520px;
}

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

.footer-links h2 {
    font-size: 16px;
}

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

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

@media (max-width: 1120px) {
    .movie-grid-four,
    .movie-grid-three,
    .category-preview-grid,
    .category-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout,
    .search-strip,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 18px;
        right: auto;
        bottom: 28px;
    }

    .movie-grid-four,
    .movie-grid-three,
    .category-preview-grid,
    .category-list-grid,
    .compact-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-shell,
    .nav-shell,
    .footer-shell {
        width: min(100% - 24px, var(--max-width));
    }

    .related-item {
        grid-template-columns: 104px minmax(0, 1fr);
    }
}
