:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.64);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #f97316;
    --red: #ef4444;
    --pink: #ec4899;
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --purple: #a855f7;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.13), transparent 28rem),
        radial-gradient(circle at 80% 6rem, rgba(14, 165, 233, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #0f172a;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav a,
.mobile-panel a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover {
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.1);
}

.site-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.site-search-form input,
.search-page-form input,
.filter-row select {
    color: var(--text);
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form input {
    width: 240px;
    padding: 11px 16px;
}

.site-search-form input:focus,
.search-page-form input:focus,
.filter-row select:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.site-search-form button,
.search-page-form button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-search-form button,
.search-page-form button,
.primary-button {
    color: #0f172a;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.22);
}

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

.site-search-form button:hover,
.search-page-form button:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.26);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
}

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

.hero-section {
    position: relative;
    height: 70vh;
    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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background:
        radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.38), transparent 26rem),
        linear-gradient(135deg, #1e293b, #020617);
    transition: transform 7s ease, opacity 0.3s ease;
}

.hero-slide.is-active img {
    transform: scale(1.05);
}

img.is-missing {
    opacity: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.55) 44%, rgba(2, 6, 23, 0.08) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 48%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 96px;
}

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

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

.hero-copy h1,
.page-hero h1,
.detail-heading h1 {
    margin: 0;
    color: white;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-heading p {
    color: var(--soft);
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta,
.card-meta,
.filter-row,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-meta span,
.card-meta span {
    color: var(--muted);
    font-size: 14px;
}

.hero-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: rgba(148, 163, 184, 0.5);
}

.hero-actions {
    margin-top: 26px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-light);
}

.quick-search-panel,
.section-block {
    margin-top: 40px;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.64));
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-title h2,
.content-panel h2,
.side-card h2,
.category-overview-body h2 {
    margin: 0;
    color: var(--text);
}

.quick-search-panel p,
.section-title p,
.content-panel p,
.category-overview-body p,
.side-card dd,
.side-card dt {
    color: var(--muted);
}

.wide-search input {
    width: 100%;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.section-title > span {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #0f172a;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    font-weight: 900;
}

.section-title h2 {
    font-size: 30px;
}

.section-title p {
    margin: 6px 0 0;
}

.hot-title > span {
    color: white;
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.blue-title > span {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.purple-title > span {
    color: white;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.section-more {
    margin-left: auto;
    color: var(--amber-light);
    font-weight: 700;
}

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

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

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

.compact-grid {
    margin-top: 18px;
}

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.12);
}

.card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 28% 18%, rgba(245, 158, 11, 0.28), transparent 8rem),
        linear-gradient(135deg, #1e293b, #020617);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.card-badge,
.card-play {
    position: absolute;
    z-index: 2;
}

.card-badge {
    top: 10px;
    left: 10px;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.94);
    font-size: 12px;
    font-weight: 800;
}

.card-play {
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card.large .card-body h3 {
    font-size: 19px;
}

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

.category-card,
.category-overview-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.category-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 16px;
    padding: 14px;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.category-thumbs,
.category-overview-media {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.category-thumbs img,
.category-overview-media img {
    width: 100%;
    height: 82px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.category-card h3,
.category-overview-body h2 {
    margin: 4px 0 8px;
}

.category-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.category-overview-card {
    display: block;
}

.category-overview-media img {
    height: 150px;
}

.category-overview-body {
    padding: 20px;
}

.category-overview-body span {
    color: var(--amber-light);
    font-weight: 800;
}

.two-column-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.rank-list,
.latest-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border 0.2s ease;
}

.latest-list .rank-item {
    grid-template-columns: 74px 1fr;
}

.latest-list .rank-number {
    display: none;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.45);
}

.rank-item img {
    width: 74px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-number {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #0f172a;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    font-weight: 900;
}

.rank-item h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 16px;
}

.rank-item p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.rank-item span {
    color: var(--amber-light);
    font-size: 13px;
}

.page-hero,
.detail-top {
    position: relative;
    overflow: hidden;
    padding: 92px 0 46px;
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 24rem),
        radial-gradient(circle at 82% 20%, rgba(6, 182, 212, 0.12), transparent 26rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0));
}

.small-hero h1,
.detail-heading h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.search-page-form {
    display: flex;
    width: min(760px, 100%);
    gap: 10px;
    margin: 28px 0 16px;
}

.search-page-form input {
    flex: 1;
    padding: 14px 18px;
}

.filter-row select {
    min-width: 160px;
    padding: 11px 14px;
}

.detail-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

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

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    color: white;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 16rem),
        rgba(2, 6, 23, 0.58);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-button {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    color: #0f172a;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
    cursor: pointer;
    font-size: 30px;
}

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

.content-panel,
.side-card {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-panel p {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.9;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.side-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: var(--shadow);
}

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

.side-card dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px 14px;
    margin: 18px 0;
}

.side-card dt {
    font-weight: 700;
}

.side-card dd {
    margin: 0;
}

.side-card a {
    color: var(--amber-light);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud span {
    color: var(--amber-light);
    padding: 6px 10px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.08);
    font-size: 13px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    padding: 34px 0;
}

.footer-logo {
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 640px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    padding: 18px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
    .six-cols {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .detail-layout,
    .two-column-block,
    .quick-search-panel {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .desktop-nav,
    .nav-wrap > .site-search-form {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-section {
        height: 76vh;
        min-height: 540px;
    }

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

    .hero-arrow {
        top: auto;
        bottom: 28px;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .hero-dots {
        bottom: 38px;
    }

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

    .category-card {
        grid-template-columns: 1fr;
    }

    .search-page-form,
    .detail-heading,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-row select {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-heading h1 {
        font-size: 34px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-heading p {
        font-size: 15px;
    }

    .movie-grid {
        gap: 12px;
    }

    .card-body {
        padding: 11px;
    }

    .card-body h3 {
        min-height: 40px;
        font-size: 14px;
    }

    .card-body p {
        display: none;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .rank-item,
    .latest-list .rank-item {
        grid-template-columns: 56px 1fr;
    }

    .rank-number {
        display: none;
    }

    .rank-item img {
        width: 56px;
        height: 76px;
    }

    .content-panel,
    .side-card,
    .quick-search-panel {
        padding: 18px;
        border-radius: 20px;
    }
}
