:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --cyan-bright: #22d3ee;
    --blue: #2563eb;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius-xl: 22px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.max-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan-bright), var(--blue));
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.32);
}

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

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

.nav-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 15px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.header-search {
    margin-left: auto;
    width: 290px;
}

.search-box {
    position: relative;
}

.site-search-input,
.local-filter-input,
.local-filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    outline: none;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-search-input:focus,
.local-filter-input:focus,
.local-filter-select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 420px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 80;
}

.search-results.is-open {
    display: block;
}

.search-results a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ink);
}

.search-results a:hover {
    background: #ecfeff;
}

.search-results strong {
    display: block;
    font-size: 14px;
}

.search-results span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 26%, rgba(34, 211, 238, 0.3), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.84) 36%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.08) 52%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1240px) / 2));
    top: 50%;
    transform: translateY(-50%);
    max-width: 660px;
    color: #ffffff;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    color: var(--cyan-bright);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 13px;
}

.hero-content h1 {
    margin: 14px 0 16px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 620px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dffbff;
    font-size: 12px;
}

.tag-row span {
    background: #ecfeff;
    color: #0e7490;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 32px rgba(8, 145, 178, 0.3);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-panel {
    position: absolute;
    right: max(32px, calc((100vw - 1240px) / 2));
    bottom: 86px;
    z-index: 3;
    width: min(380px, calc(100% - 64px));
    padding: 18px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.hero-mini-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.hero-mini-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-mini-list a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.18);
}

.hero-mini-list span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cyan);
    color: #ffffff;
    font-size: 12px;
}

.hero-controls {
    position: absolute;
    left: max(32px, calc((100vw - 1240px) / 2));
    bottom: 52px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

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

.content-section {
    padding: 58px 0;
}

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

.section-heading h2 {
    margin: 6px 0 4px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    color: var(--muted);
    margin: 0;
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.feature-card,
.movie-card,
.category-tile,
.category-overview-card,
.player-card,
.detail-info-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.84);
}

.feature-card {
    display: grid;
    grid-template-columns: 42% 1fr;
    min-height: 240px;
}

.feature-cover,
.poster-shell,
.category-cover {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.feature-cover img,
.poster-shell img,
.category-cover img,
.detail-info-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.feature-card:hover img,
.movie-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.06);
}

.feature-cover span,
.card-type,
.rank-num,
.category-cover span {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.rank-num {
    left: auto;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.feature-body {
    padding: 24px;
}

.eyebrow,
.feature-meta,
.card-meta,
.detail-meta {
    color: var(--muted);
    font-size: 13px;
}

.feature-body h3,
.movie-card h3,
.category-tile h3,
.category-overview-card h2 {
    margin: 8px 0;
    color: var(--ink);
    line-height: 1.25;
}

.feature-body h3 {
    font-size: 24px;
}

.feature-body p,
.card-desc,
.category-tile p,
.category-overview-card p {
    color: var(--muted);
    margin: 0 0 14px;
}

.category-grid,
.movie-grid,
.overview-grid {
    display: grid;
    gap: 22px;
}

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

.category-tile {
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.category-samples,
.category-overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a,
.category-overview-links a {
    color: #0e7490;
    background: #ecfeff;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-shell {
    aspect-ratio: 3 / 4;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.movie-card h3 {
    font-size: 16px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.movie-card .tag-row {
    margin-top: auto;
    padding-top: 12px;
}

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

.dark-band {
    background: linear-gradient(135deg, var(--dark), var(--dark-soft));
    color: #ffffff;
}

.dark-band .section-heading h2,
.dark-band .movie-card h3,
.dark-band .card-meta {
    color: #ffffff;
}

.dark-band .section-heading p,
.dark-band .card-desc {
    color: #cbd5e1;
}

.dark-band .movie-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.rank-row:hover {
    border-color: rgba(8, 145, 178, 0.38);
    transform: translateY(-2px);
}

.rank-row span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
    font-size: 13px;
}

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

.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.extended {
    margin-top: 28px;
}

.rank-row.wide {
    grid-template-columns: 54px 1fr minmax(220px, auto);
}

.sub-hero,
.detail-hero {
    background:
        radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.28), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 55%, #164e63);
    color: #ffffff;
    padding: 70px 0 76px;
}

.sub-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.05em;
}

.sub-hero p {
    max-width: 780px;
    color: #dbeafe;
}

.sub-search {
    width: min(520px, 100%);
    margin-top: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: #bfdbfe;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-top: 26px;
    max-width: 820px;
}

.overview-grid {
    grid-template-columns: repeat(2, 1fr);
}

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 18px;
}

.category-cover {
    min-height: 210px;
    border-radius: 18px;
}

.detail-hero {
    padding-bottom: 46px;
}

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

.player-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.18));
    cursor: pointer;
}

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

.play-pulse {
    position: absolute;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.22);
    animation: pulse 1.8s infinite;
}

.play-icon {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.36);
    font-size: 30px;
}

@keyframes pulse {
    0% { transform: scale(0.75); opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
}

.detail-info-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.detail-info-card img {
    height: 360px;
    border-radius: 16px;
}

.detail-side-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-side-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 12px;
}

.detail-content {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 34px;
    margin-top: -22px;
    position: relative;
    z-index: 2;
}

.detail-content h1 {
    margin: 8px 0 10px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.detail-content p {
    color: #334155;
    font-size: 16px;
}

.lead-text {
    font-weight: 700;
    color: #0f172a;
}

.detail-tags {
    margin-top: 18px;
}

.site-footer {
    margin-top: 60px;
    padding: 46px 0 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 44px;
}

.footer-brand p {
    color: #94a3b8;
    margin: 14px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.18);
}

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1120px) {
    .feature-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .hero-panel {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(620px, calc(100% - 32px));
        margin: -120px auto 32px;
    }

    .hero-carousel {
        min-height: 720px;
        padding-bottom: 20px;
    }
}

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

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

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

    .mobile-nav .nav-link {
        display: block;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        top: 42%;
    }

    .hero-text {
        font-size: 16px;
    }

    .hero-controls {
        left: 20px;
        bottom: 150px;
    }

    .feature-card,
    .category-overview-card,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .feature-cover {
        min-height: 220px;
    }

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

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

    .rank-row,
    .rank-row.wide {
        grid-template-columns: 38px 1fr;
    }

    .rank-row em {
        grid-column: 2;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .detail-info-card {
        display: none;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 66px;
    }

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

    .hero-carousel {
        min-height: 660px;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .category-tile,
    .detail-content {
        padding: 18px;
    }

    .card-desc,
    .tag-row {
        display: none;
    }

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

    .movie-card h3 {
        font-size: 14px;
    }
}
