:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(245, 158, 11, 0.18);
    --line-strong: rgba(245, 158, 11, 0.38);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --accent-deep: #d97706;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

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

.brand-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 999px;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.36);
}

.brand-text {
    font-size: 22px;
    color: transparent;
    background: linear-gradient(90deg, #fbbf24, #fb923c, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-link-small {
    font-size: 13px;
    color: var(--muted);
}

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.78);
    border-radius: 14px;
}

.header-search input,
.mobile-search input,
.big-search input,
.list-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 220px;
    padding: 11px 12px;
}

.header-search button,
.mobile-search button,
.big-search button {
    border: 0;
    color: #111827;
    background: var(--accent);
    font-weight: 800;
    padding: 11px 16px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 12px;
    place-items: center;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px auto;
    background: var(--accent);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel-inner {
    padding: 18px 0 24px;
}

.mobile-search {
    margin-bottom: 16px;
}

.mobile-search input {
    padding: 12px;
}

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

.hero-slider {
    position: relative;
    height: min(82vh, 760px);
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.2)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.58) 38%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: var(--container);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 820px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 680px;
    margin: 24px 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.8;
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-tags span,
.tag-row span {
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

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

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.38);
}

.btn-ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line-strong);
}

.btn-wide {
    width: 100%;
    margin-top: 18px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    background: rgba(0, 0, 0, 0.42);
    border-radius: 999px;
    font-size: 38px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 36px;
    height: 4px;
    border: 0;
    background: rgba(255, 255, 255, 0.38);
    border-radius: 999px;
}

.hero-dot.is-active {
    background: var(--accent);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: center;
    margin-top: -62px;
    position: relative;
    z-index: 10;
    padding: 28px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel h2 {
    margin: 14px 0 10px;
    font-size: clamp(24px, 4vw, 36px);
}

.quick-search-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.big-search input {
    padding: 16px;
}

.big-search button {
    padding: 16px 20px;
    white-space: nowrap;
}

.content-section,
.category-overview-grid,
.list-tools,
.detail-content,
.player-section {
    margin-top: 72px;
}

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

.section-heading h2,
.rank-panel h2,
.category-overview-card h2,
.detail-article h2,
.detail-side h2,
.site-footer h2 {
    margin: 12px 0 0;
    font-size: clamp(24px, 4vw, 34px);
}

.section-link {
    color: var(--accent);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.18));
}

.category-name,
.category-desc {
    position: absolute;
    left: 18px;
    right: 18px;
}

.category-name {
    bottom: 62px;
    font-size: 24px;
    font-weight: 900;
}

.category-desc {
    bottom: 18px;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.6;
}

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

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

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

.movie-grid-directory {
    margin-top: 24px;
}

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.92);
    border-color: var(--line-strong);
    box-shadow: 0 22px 60px rgba(245, 158, 11, 0.12);
}

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

.movie-card-large .card-cover {
    aspect-ratio: 16 / 9;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.06));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #111827;
    background: var(--accent);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    color: #111827;
    background: var(--accent);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--accent);
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-bottom: 12px;
    color: #64748b;
    font-size: 13px;
}

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

.rank-panel,
.category-overview-card,
.detail-article,
.detail-side,
.player-shell {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rank-panel {
    position: sticky;
    top: 100px;
    padding: 22px;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: auto 72px minmax(0, 1fr);
    grid-template-areas:
        "rank img title"
        "rank img meta";
    gap: 10px 12px;
    align-items: center;
    padding: 10px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--line-strong);
}

.compact-card img {
    grid-area: img;
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.compact-rank,
.compact-dot {
    grid-area: rank;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #111827;
    background: var(--accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.compact-dot {
    color: var(--accent);
    background: var(--accent-soft);
}

.compact-title {
    grid-area: title;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.compact-meta {
    grid-area: meta;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-hero {
    position: relative;
    padding: 112px 0 82px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 46%),
        radial-gradient(circle at 80% 10%, rgba(251, 146, 60, 0.18), transparent 28rem);
    border-bottom: 1px solid var(--line);
}

.page-hero-small {
    padding: 86px 0 62px;
}

.page-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    padding: 24px;
}

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

.category-overview-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-chip {
    border: 1px solid var(--line);
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.64);
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 750;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #111827;
    background: var(--accent);
    border-color: var(--accent);
}

.list-search {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-weight: 800;
}

.list-search input {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.list-search-large input {
    font-size: 18px;
    padding: 18px;
}

.movie-card.is-hidden,
.compact-card.is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 70px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.46;
}

.detail-backdrop span {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.58) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.2) 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

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

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

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

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin-top: 18px;
}

.detail-one-line {
    max-width: 820px;
    margin: 20px 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 760px;
    padding: 0;
    margin: 22px 0;
    list-style: none;
}

.detail-meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
}

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

.detail-meta strong {
    color: var(--text);
    text-align: right;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.28));
    text-align: center;
}

.player-overlay.is-hidden {
    display: none;
}

.player-play {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    color: #111827;
    background: var(--accent);
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 0 54px rgba(245, 158, 11, 0.5);
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(20px, 4vw, 34px);
}

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

.detail-article,
.detail-side {
    padding: 26px;
}

.detail-article p {
    margin: 14px 0 30px;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.95;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 40px;
}

.site-footer p,
.site-footer a,
.site-footer li {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer ul {
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}

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

.footer-bottom {
    margin-top: 38px;
    padding: 22px 0;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: center;
}

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

    .menu-toggle {
        display: grid;
        margin-left: auto;
    }

    .header-search {
        display: none;
    }

    .quick-search-panel,
    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 820px) {
    .hero-slider {
        min-height: 620px;
        height: 78vh;
    }

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

    .hero-arrow {
        display: none;
    }

    .quick-search-panel {
        margin-top: 24px;
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid-top,
    .movie-grid-compact,
    .compact-list-two,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

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

    .compact-card img {
        width: 64px;
        height: 44px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .header-inner {
        min-height: 66px;
    }

    .brand-text {
        font-size: 18px;
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

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

    .big-search,
    .hero-actions,
    .section-heading,
    .category-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .mobile-nav {
        grid-template-columns: 1fr;
    }

    .movie-grid-directory {
        grid-template-columns: 1fr;
    }

    .player-play {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }
}
