:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-soft: #e2e8f0;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #f97316;
    --color-footer: #0f172a;
    --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 22px 48px rgba(15, 23, 42, 0.16);
    --radius-lg: 24px;
    --radius-md: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.nav-wrap {
    max-width: var(--container);
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), #38bdf8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.nav-link {
    position: relative;
    padding: 22px 0;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    height: 3px;
    border-radius: 999px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #eef2ff;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--color-primary);
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    padding: 8px 20px 18px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.98);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
}

.mobile-link:hover {
    color: var(--color-primary);
    background: #eff6ff;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease;
}

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-overlay,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.05) 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.16);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.hero-tags span,
.detail-meta span,
.tag-line span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

.primary-button:hover {
    transform: translateY(-2px);
    background: var(--color-primary-dark);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.quick-search-wrap,
.content-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 20px;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 560px);
    gap: 24px;
    align-items: center;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.quick-search h2,
.section-head h2,
.ranking-card h2,
.text-card h2,
.info-card h2,
.page-hero h1 {
    margin: 0;
    letter-spacing: -0.035em;
}

.search-panel {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-panel input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: none;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-panel button {
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: var(--color-primary);
    font-weight: 800;
}

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

.section-block {
    margin: 28px 0 44px;
}

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

.section-head h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-head.compact {
    align-items: flex-start;
}

.text-link {
    color: var(--color-primary);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #dbeafe;
}

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

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

.play-float {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--color-primary);
}

.movie-card p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-line span {
    min-height: 24px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 12px;
}

.side-panel {
    min-width: 0;
}

.sticky-panel {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.ranking-card,
.category-cloud,
.text-card,
.info-card,
.ranking-list-block {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.rank-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-number {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-views {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.category-cloud h3 {
    margin: 0 0 14px;
}

.category-cloud div {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.category-cloud a,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

.category-cloud a:hover,
.filter-chip:hover,
.filter-chip.is-active {
    color: #ffffff;
    background: var(--color-primary);
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.9), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f172a);
}

.compact-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
}

.page-hero-content {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 17px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.result-summary {
    margin-bottom: 18px;
    color: #475569;
    font-weight: 800;
}

.empty-result {
    padding: 32px;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: #64748b;
    text-align: center;
    box-shadow: var(--shadow-card);
}

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

.category-overview-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.35s ease;
}

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

.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.1));
}

.category-overview-card div,
.category-count {
    position: relative;
    z-index: 2;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0;
    color: #dbeafe;
}

.category-count {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.82);
    font-weight: 900;
}

.ranking-list-block {
    margin-top: 28px;
}

.ranking-list-block h2 {
    margin: 0 0 12px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: #020617;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    min-height: 620px;
    margin: 0 auto;
    padding: 64px 20px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 700;
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-section {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #020617;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-trigger {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-trigger span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.45);
    font-size: 28px;
}

.player-shell.is-playing .play-trigger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    color: #bfdbfe;
    font-size: 13px;
    text-align: center;
}

.text-card p {
    margin: 12px 0 0;
    color: #475569;
    font-size: 16px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px 14px;
    margin: 16px 0 0;
}

.info-card dt {
    color: #64748b;
    font-weight: 800;
}

.info-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.info-card a {
    color: var(--color-primary);
}

.related-wrap {
    padding-top: 0;
    padding-bottom: 56px;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.category-cloud.standalone {
    padding: 0;
    box-shadow: none;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: var(--color-footer);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 44px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 0.7fr 0.9fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    font-size: 20px;
}

.footer-brand p,
.footer-column li {
    color: #94a3b8;
}

.footer-note {
    font-size: 14px;
}

.footer-column h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 13px;
}

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

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

    .nav-links {
        gap: 12px;
        font-size: 14px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 560px;
    }

    .quick-search,
    .two-column,
    .detail-layout,
    .about-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .quick-search {
        margin-top: -42px;
    }

    .side-panel,
    .detail-side {
        order: initial;
    }

    .sticky-panel {
        position: static;
    }

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

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

@media (max-width: 720px) {
    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        padding-top: 72px;
        padding-bottom: 100px;
    }

    .hero-overlay,
    .detail-overlay {
        background:
            linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.48)),
            linear-gradient(90deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
    }

    .hero-actions,
    .search-panel,
    .footer-bottom {
        flex-direction: column;
    }

    .search-panel button,
    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

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

    .movie-card p {
        min-height: auto;
    }

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

    .detail-hero-inner {
        grid-template-columns: 1fr;
        padding-top: 42px;
    }

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

    .detail-meta {
        margin: 18px 0;
    }

    .player-section,
    .text-card,
    .info-card,
    .ranking-card,
    .category-cloud,
    .ranking-list-block {
        padding: 18px;
    }
}

@media (max-width: 420px) {
    .brand-text {
        font-size: 18px;
    }

    .movie-grid,
    .movie-grid.six-grid,
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }
}
