:root {
    color-scheme: dark;
    --site-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.84);
    --panel-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #f472b6;
    --gold: #f59e0b;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 28rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 34rem),
        var(--site-bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

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

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--soft);
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(14, 165, 233, 0.18);
    transform: translateY(-1px);
}

.top-search,
.mobile-search,
.hero-search,
.quick-search-panel form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.quick-search-panel input {
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    outline: 0;
    border-radius: 999px;
    padding: 11px 16px;
    min-width: 210px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.quick-search-panel input:focus {
    border-color: rgba(34, 211, 238, 0.68);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.top-search button,
.mobile-search button,
.hero-search button,
.quick-search-panel button,
.primary-action,
.secondary-action,
.section-more,
.page-actions a {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 32px rgba(14, 165, 233, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.secondary-action,
.page-actions a:nth-child(2) {
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    box-shadow: none;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.quick-search-panel button:hover,
.primary-action:hover,
.secondary-action:hover,
.section-more:hover,
.page-actions a:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.74);
    color: #fff;
    padding: 10px;
}

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

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

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.03);
}

.mobile-nav-link.is-active {
    color: #fff;
    background: rgba(14, 165, 233, 0.18);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    max-width: 1280px;
    min-height: 640px;
    margin: 28px auto 0;
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-track {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 56px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

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

.hero-badge,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-summary {
    font-size: 18px;
    line-height: 1.85;
    color: #dbeafe;
    max-width: 680px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.detail-tags span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transform: rotate(2deg);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 72px;
    bottom: 32px;
    z-index: 11;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

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

.quick-search-panel,
.content-section,
.category-section,
.rank-section,
.ranking-section,
.detail-content,
.player-section {
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 0 24px;
}

.quick-search-panel {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.74));
    box-shadow: var(--shadow);
}

.quick-search-panel span {
    color: #67e8f9;
    font-weight: 800;
}

.quick-search-panel h2 {
    margin: 6px 0;
    font-size: 30px;
    font-weight: 950;
}

.quick-search-panel p {
    margin: 0;
    color: var(--soft);
}

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

.section-heading h2 {
    margin: 14px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.03em;
}

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

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 10px;
    padding: 22px;
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
}

.category-tile span {
    font-size: 22px;
    font-weight: 950;
}

.category-tile p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.7;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 26px 72px rgba(8, 145, 178, 0.18);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.card-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-year,
.card-play {
    position: absolute;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
}

.card-year {
    left: 12px;
}

.card-play {
    right: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: #67e8f9;
}

.card-meta,
.card-desc {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 13px;
}

.card-desc {
    color: var(--soft);
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

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

.rank-row,
.ranking-card {
    display: grid;
    grid-template-columns: 54px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border 0.2s ease;
}

.rank-row:hover,
.ranking-card:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-no,
.ranking-index {
    color: #67e8f9;
    font-size: 20px;
    font-weight: 950;
    text-align: center;
}

.rank-row img,
.ranking-card img {
    width: 56px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title,
.ranking-main strong {
    display: block;
    font-weight: 900;
    line-height: 1.4;
}

.ranking-main em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.rank-pill,
.ranking-year {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    min-height: 360px;
    margin: 28px auto 0;
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid var(--line);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.page-hero {
    display: flex;
    align-items: end;
    padding: 56px;
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: #dbeafe;
    line-height: 1.85;
    font-size: 18px;
}

.detail-hero-inner {
    min-height: 520px;
    padding: 58px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    align-items: end;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    font-weight: 750;
    margin-bottom: 18px;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 820px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.85;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.36);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 26px;
    font-weight: 950;
}

.player-overlay em {
    color: #dbeafe;
    font-style: normal;
}

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

.detail-content section {
    padding: 30px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
}

.detail-content h2 {
    margin: 16px 0 12px;
    font-size: 28px;
    font-weight: 950;
}

.detail-content p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
    line-height: 2;
}

.compact-section .section-heading {
    margin-top: 36px;
}

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 42px;
}

.footer-logo {
    font-size: 26px;
    font-weight: 950;
    color: #67e8f9;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.footer-links h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 900;
}

.footer-link-list {
    display: grid;
    gap: 10px;
}

.footer-link-list a {
    color: var(--muted);
}

.footer-link-list a:hover {
    color: #67e8f9;
}

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

[data-page="search"] .movie-card.is-hidden {
    display: none;
}

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 56px;
    }

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

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

@media (max-width: 860px) {
    .header-inner {
        padding: 0 18px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-carousel,
    .page-hero,
    .detail-hero {
        margin: 18px 14px 0;
        border-radius: 24px;
    }

    .hero-track,
    .hero-carousel {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: end;
        padding: 34px 24px 76px;
        gap: 22px;
    }

    .hero-poster {
        max-width: 210px;
        transform: rotate(0deg);
    }

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

    .hero-dots {
        left: 24px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel,
    .content-section,
    .category-section,
    .rank-section,
    .ranking-section,
    .detail-content,
    .player-section {
        padding: 0 14px;
    }

    .quick-search-panel {
        margin: 18px 14px 0;
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .quick-search-panel form,
    .hero-search,
    .mobile-search {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search-panel input,
    .hero-search input,
    .mobile-search input {
        width: 100%;
        min-width: 0;
    }

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

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

    .page-hero {
        padding: 34px 24px;
        min-height: 320px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding: 34px 24px;
        gap: 24px;
    }

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

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

    .rank-row,
    .ranking-card {
        grid-template-columns: 42px 50px minmax(0, 1fr);
    }

    .rank-pill,
    .ranking-year {
        display: none;
    }

    .footer-inner,
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand-title {
        font-size: 17px;
    }

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

    .category-grid,
    .movie-grid,
    .small-grid,
    .all-grid {
        grid-template-columns: 1fr;
    }

    .card-cover img {
        aspect-ratio: 16 / 10;
    }
}
