* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.12), transparent 34rem),
        radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #111827 44%, #0f172a 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.28);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #cbd5e1;
    font-weight: 600;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a {
    transition: color 0.22s ease, transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
    color: var(--cyan);
}

.nav-search {
    position: relative;
    display: flex;
    width: 310px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.86);
    overflow: hidden;
}

.nav-search input,
.mobile-panel input,
.big-search input,
.filter-grid input,
.filter-grid select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
}

.nav-search input {
    padding: 10px 14px;
}

.nav-search button,
.big-search button,
.mobile-panel button {
    border: 0;
    padding: 0 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

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

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

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.86);
}

.mobile-panel input {
    padding: 12px 14px;
}

main,
.page-main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 84px;
    opacity: 0;
    transform: scale(1.02);
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, #0f172a, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(900px, 100%);
    text-align: center;
    margin: 0 auto;
}

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-content h1 {
    margin: 18px 0 8px;
    font-size: clamp(48px, 8vw, 94px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: linear-gradient(90deg, #a5f3fc, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content h2 {
    margin: 0 auto 18px;
    font-size: clamp(24px, 3vw, 44px);
    line-height: 1.15;
    font-weight: 800;
}

.hero-content p {
    max-width: 760px;
    margin: 0 auto 30px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(15, 23, 42, 0.42);
    color: #dbeafe;
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 44px rgba(34, 211, 238, 0.22);
}

.hero-tags,
.tag-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    color: #cffafe;
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
    font-weight: 700;
}

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

.hero-dot {
    width: 30px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.quick-panel,
.section-block,
.search-panel,
.pagination,
.page-hero,
.detail-main,
.site-footer .footer-grid,
.footer-bottom {
    width: min(1280px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    margin-top: -40px;
    position: relative;
    z-index: 5;
}

.quick-search-card,
.quick-links,
.page-hero,
.search-panel,
.player-box,
.detail-content article,
.ranking-panel,
.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    padding: 28px;
}

.quick-search-card span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.quick-search-card h2 {
    margin: 8px 0 20px;
    font-size: clamp(24px, 3vw, 36px);
}

.big-search {
    display: flex;
    min-height: 54px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.74);
}

.big-search input {
    padding: 0 18px;
}

.big-search button {
    padding: 0 26px;
    font-weight: 800;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 24px;
}

.quick-links a {
    display: grid;
    place-items: center;
    min-height: 80px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background: rgba(34, 211, 238, 0.08);
    color: #cffafe;
    font-weight: 800;
    transition: transform 0.24s ease, background 0.24s ease;
}

.quick-links a:hover {
    transform: translateY(-3px);
    background: rgba(34, 211, 238, 0.15);
}

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

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

.compact-heading h2 {
    font-size: 26px;
}

.scroll-row {
    display: flex;
    gap: 22px;
    padding: 2px 0 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.grid {
    display: grid;
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card a:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.16);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.14));
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #a5f3fc;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info p,
.wide-card p,
.category-card p,
.page-hero p,
.detail-copy p,
.detail-content p,
.site-footer p {
    color: var(--muted);
}

.movie-info p {
    margin: 0 0 14px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info .tag-row {
    justify-content: flex-start;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
}

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

.rank-list,
.rank-page-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.52);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-page-list .rank-item {
    grid-template-columns: 64px 80px minmax(0, 1fr);
    padding: 14px;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.rank-number {
    display: grid;
    place-items: center;
    color: #67e8f9;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(34, 211, 238, 0.08);
}

.rank-page-list .rank-item img {
    width: 80px;
    height: 108px;
}

.rank-item strong {
    display: block;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.category-card {
    min-height: 168px;
    padding: 22px;
    transition: transform 0.26s ease, border-color 0.26s ease, background 0.26s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.1));
}

.category-card span {
    display: block;
    margin-bottom: 12px;
    color: #f8fafc;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    font-size: 14px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.wide-card img {
    width: 94px;
    height: 126px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(34, 211, 238, 0.08);
}

.wide-card span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
}

.wide-card strong {
    display: block;
    margin: 7px 0;
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.28;
}

.page-hero {
    margin-top: 36px;
    padding: clamp(34px, 6vw, 72px);
    min-height: 280px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.24), transparent 24rem),
        linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
}

.page-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    font-size: 18px;
}

.channel-hero .hero-actions,
.shallow-hero .hero-actions {
    justify-content: flex-start;
    margin-top: 24px;
}

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

.filter-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 16px;
}

.filter-grid label {
    display: grid;
    gap: 8px;
}

.filter-grid span {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.filter-grid input,
.filter-grid select {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.58);
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 30px;
}

.pagination a,
.pagination span {
    min-width: 94px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    text-align: center;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
}

.pagination .is-current {
    border-color: rgba(34, 211, 238, 0.44);
    color: #cffafe;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 32px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #a5f3fc;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 100% 20%, rgba(34, 211, 238, 0.14), transparent 26rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    object-fit: cover;
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.detail-copy .lead {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: 20px;
}

.detail-tags {
    justify-content: flex-start;
    margin-bottom: 26px;
}

.player-section {
    padding-top: 34px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), transparent 14rem),
        rgba(2, 6, 23, 0.54);
    color: #ffffff;
    cursor: pointer;
    z-index: 2;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.3);
}

.player-overlay span:last-child {
    font-size: 20px;
    font-weight: 900;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-top: 34px;
}

.detail-content article {
    padding: 26px;
}

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

.detail-content p {
    margin: 0;
    font-size: 16px;
}

.related-block {
    padding-bottom: 28px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0 30px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #f8fafc;
    font-size: 16px;
}

.site-footer p {
    margin: 14px 0 0;
    max-width: 460px;
}

.site-footer a {
    display: block;
    margin: 9px 0;
    color: var(--muted);
}

.footer-bottom {
    padding: 22px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    text-align: center;
    font-size: 14px;
}

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

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .quick-panel,
    .detail-hero,
    .detail-content,
    .footer-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        max-width: 360px;
    }
}

@media (max-width: 620px) {
    .nav-shell {
        padding: 0 16px;
    }

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

    .hero-slide {
        min-height: 76vh;
        padding: 98px 18px 82px;
    }

    .hero-actions,
    .channel-hero .hero-actions,
    .shallow-hero .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .quick-panel,
    .section-block,
    .search-panel,
    .pagination,
    .page-hero,
    .detail-main,
    .site-footer .footer-grid,
    .footer-bottom {
        width: min(100% - 28px, 1280px);
    }

    .quick-links,
    .cards-grid,
    .small-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .scroll-row .movie-card {
        flex-basis: 220px;
    }

    .detail-hero {
        padding: 20px;
    }

    .rank-page-list .rank-item {
        grid-template-columns: 48px 62px minmax(0, 1fr);
    }

    .rank-page-list .rank-item img {
        width: 62px;
        height: 84px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
