* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c32;
    --panel: #1e293b;
    --panel-strong: #253449;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.24);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --purple: #7c3aed;
    --shadow: 0 22px 60px rgba(2, 6, 23, 0.42);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 32rem),
        radial-gradient(circle at 80% 6%, rgba(124, 58, 237, 0.12), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #111827 46%, #0b1120 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    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.16);
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.94), rgba(30, 41, 59, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.nav-shell,
.footer-shell,
.page-shell,
.detail-shell,
.home-search-panel,
.category-strip,
.section-block,
.rank-preview,
.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

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

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.brand-text small {
    color: var(--cyan);
    font-size: 12px;
}

.nav-links {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    overflow: hidden;
    white-space: nowrap;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
    color: #dbeafe;
    transition: color 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-links a:hover {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
    padding: 9px 16px;
}

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

.mobile-menu.is-open {
    display: grid;
    gap: 12px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: -40px;
    z-index: -2;
    background-position: center;
    background-size: cover;
    filter: blur(20px) saturate(1.25);
    transform: scale(1.08);
    opacity: 0.28;
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.36) 100%),
        radial-gradient(circle at 78% 36%, rgba(34, 211, 238, 0.22), transparent 24rem);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 46px;
    padding: 78px 0 92px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.34);
    color: var(--cyan);
    padding: 8px 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.detail-badges span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
    color: #cbd5e1;
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.category-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button,
.quick-search button,
.category-more {
    border: 0;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(14, 165, 233, 0.3);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.56);
    color: #e2e8f0;
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover,
.category-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    justify-self: center;
    width: min(100%, 330px);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.9);
    color: white;
    padding: 8px 12px;
    font-weight: 800;
}

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

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

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

.home-search-panel,
.category-strip,
.section-block,
.rank-preview,
.page-hero,
.search-panel,
.rank-full,
.category-overview,
.detail-grid,
.related-section {
    margin-top: 34px;
}

.home-search-panel,
.category-strip,
.page-hero,
.search-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.2);
}

.home-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr);
    gap: 26px;
    align-items: center;
    padding: 26px;
}

.home-search-panel h2,
.category-strip h2,
.section-title-row h2,
.page-hero h1,
.detail-content h1,
.detail-content h2,
.detail-side h2 {
    margin: 0;
}

.home-search-panel p,
.page-hero p,
.category-card p,
.footer-shell p,
.detail-content p {
    color: var(--muted);
}

.quick-search,
.inline-filter,
.search-controls {
    display: flex;
    gap: 12px;
}

.quick-search input,
.inline-filter input,
.search-controls input,
.search-controls select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    outline: none;
    background: rgba(15, 23, 42, 0.74);
    color: var(--text);
    padding: 13px 14px;
}

.category-strip {
    padding: 24px;
}

.category-strip div,
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-strip a,
.category-tabs a {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: #dbeafe;
    padding: 10px 15px;
}

.category-tabs a.is-active,
.category-strip a:hover,
.category-tabs a:hover {
    border-color: rgba(34, 211, 238, 0.52);
    background: rgba(8, 145, 178, 0.22);
    color: var(--cyan);
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title-row h2 {
    font-size: clamp(24px, 3vw, 32px);
}

.section-title-row a {
    color: var(--cyan);
    font-weight: 700;
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.22);
}

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

.poster-link::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.86) 100%);
    opacity: 0.85;
}

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

.poster-year,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.poster-year {
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    padding: 5px 9px;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    background: rgba(6, 182, 212, 0.9);
    color: white;
    padding: 6px 10px;
}

.card-body {
    padding-top: 11px;
}

.card-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.38;
}

.card-title a:hover {
    color: var(--cyan);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 6px 0 8px;
    overflow: hidden;
    color: #aebcd1;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #7dd3fc;
    font-size: 12px;
}

.tag-row {
    margin-top: 8px;
}

.tag-row span {
    padding: 3px 7px;
    font-size: 11px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 36px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
    padding: 10px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-item:hover {
    border-color: rgba(34, 211, 238, 0.48);
    transform: translateY(-2px);
}

.rank-num {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--cyan);
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-info {
    display: grid;
    min-width: 0;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info small {
    color: var(--muted);
}

.page-shell,
.detail-shell {
    padding-bottom: 44px;
}

.page-hero {
    padding: 34px;
}

.small-hero {
    min-height: 190px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    font-size: 17px;
}

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

.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.72);
    padding: 20px;
}

.category-card h2 {
    margin: 0 0 8px;
}

.compact-grid {
    display: grid;
    gap: 10px;
}

.compact-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-radius: 12px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.44);
}

.compact-card:hover {
    background: rgba(8, 145, 178, 0.18);
}

.compact-card img {
    width: 48px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.compact-card span {
    display: grid;
    min-width: 0;
}

.compact-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card small {
    color: var(--muted);
}

.category-more {
    margin-top: 16px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
}

.crumbs a {
    color: #7dd3fc;
}

.inline-filter {
    max-width: 520px;
    margin-top: 22px;
}

.search-panel {
    padding: 24px;
}

.search-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.6fr));
}

.search-controls label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.search-status {
    margin: 18px 0;
    color: var(--cyan);
    font-weight: 800;
}

.detail-crumbs {
    margin-top: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
}

.detail-main,
.detail-side {
    min-width: 0;
}

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

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
    color: white;
    cursor: pointer;
}

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

.play-triangle {
    display: block;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.34);
}

.play-triangle::after {
    display: block;
    width: 0;
    height: 0;
    margin: 25px 0 0 32px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
    content: "";
}

.detail-content,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.74);
    padding: 24px;
}

.detail-content {
    margin-top: 22px;
}

.detail-content h1 {
    margin-top: 16px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.lead-text {
    color: #dbeafe !important;
    font-size: 18px;
}

.detail-tags {
    margin: 18px 0 24px;
}

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

.detail-side {
    align-self: start;
    position: sticky;
    top: 96px;
}

.side-list {
    margin-top: 14px;
}

.site-footer {
    margin-top: 56px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.96));
}

.footer-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 36px 0;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
    padding: 18px 16px;
    text-align: center;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-content,
    .home-search-panel,
    .detail-grid,
    .footer-shell,
    .category-overview,
    .search-controls {
        grid-template-columns: 1fr;
    }

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

    .hero-content {
        gap: 28px;
    }

    .hero-poster {
        justify-self: start;
        width: min(100%, 260px);
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 680px) {
    .nav-shell,
    .footer-shell,
    .page-shell,
    .detail-shell,
    .home-search-panel,
    .category-strip,
    .section-block,
    .rank-preview,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

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

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

    .rank-list,
    .full-rank {
        grid-template-columns: 1fr;
    }

    .quick-search {
        display: grid;
    }

    .page-hero,
    .search-panel,
    .home-search-panel,
    .category-strip,
    .detail-content,
    .detail-side {
        padding: 18px;
    }

    .footer-links {
        align-items: flex-start;
        flex-direction: column;
    }
}
