:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-deep: #1e3a8a;
    --blue-soft: #dbeafe;
    --gold: #f59e0b;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 36rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 34rem);
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    color: #334155;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a,
.footer-inner nav a {
    transition: color 0.24s ease, background 0.24s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-inner nav a:hover {
    color: var(--blue);
}

.header-search {
    width: 310px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 14px 11px 18px;
    color: var(--ink);
    background: transparent;
}

.header-search button,
.primary-button,
.secondary-button,
.search-panel button,
.play-button {
    border: 0;
    cursor: pointer;
}

.header-search button {
    padding: 11px 18px;
    color: #ffffff;
    background: var(--blue);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--blue);
    background: #ffffff;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 20px;
    gap: 12px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-nav a,
.mobile-nav form {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.mobile-nav form {
    display: flex;
    gap: 10px;
}

.mobile-nav input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 12px;
}

.mobile-nav button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #ffffff;
    background: var(--blue);
}

.main-wrap,
.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.hero-slider {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.025);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(96, 165, 250, 0.38), transparent 24rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.78));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--blue-soft);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

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

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.14);
}

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

.slider-dots button {
    width: 40px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.slider-dots button.active {
    background: #ffffff;
}

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

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

.section-title p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.78;
}

.more-link {
    flex: 0 0 auto;
    color: var(--blue);
    font-weight: 800;
}

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

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

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

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

.category-card,
.info-card,
.movie-card,
.rank-item,
.search-panel,
.detail-panel,
.text-panel {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.category-card,
.info-card {
    display: block;
    padding: 24px;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: var(--shadow);
}

.category-card strong,
.info-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-card span,
.info-card span {
    color: var(--muted);
    line-height: 1.6;
}

.movie-card {
    display: block;
    overflow: hidden;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.cover-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    min-height: 260px;
    overflow: hidden;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.cover-frame::after,
.rank-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(96, 165, 250, 0.12), transparent 55%),
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.10), transparent 18rem);
}

.cover-type,
.cover-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.cover-type {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
}

.cover-year {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.88);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), #ef4444);
}

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.movie-card-body strong {
    font-size: 18px;
    line-height: 1.28;
}

.movie-card-body em,
.movie-card-body small,
.rank-text em,
.rank-text small {
    color: var(--muted);
    font-style: normal;
    line-height: 1.62;
}

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

.tag-row span,
.pill-link,
.meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--blue-deep);
    background: var(--blue-soft);
    font-size: 12px;
    font-weight: 750;
}

.tag-row span {
    padding: 5px 8px;
}

.pill-link,
.meta-chip {
    padding: 7px 11px;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 94px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.list-rank {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #38bdf8);
    font-weight: 900;
}

.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.rank-text {
    display: grid;
    gap: 5px;
}

.rank-action {
    color: var(--blue);
    font-weight: 850;
}

.search-panel {
    padding: 20px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, 180px) auto;
    gap: 12px;
}

.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    outline: 0;
    background: #ffffff;
}

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

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

.result-empty {
    display: none;
    padding: 28px;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

.result-empty.show {
    display: block;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    font-weight: 750;
}

.pagination span {
    color: #ffffff;
    border-color: var(--blue);
    background: var(--blue);
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.movie-player {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-player video {
    width: 100%;
    height: 100%;
    min-height: 430px;
    display: block;
    object-fit: cover;
    background: #020617;
}

.player-layer {
    pointer-events: none;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.28));
    transition: opacity 0.24s ease;
}

.movie-player.playing .player-layer {
    opacity: 0;
}

.play-button {
    pointer-events: auto;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 28px;
}

.detail-panel,
.text-panel {
    padding: 28px;
}

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.detail-panel p,
.text-panel p {
    color: var(--muted);
    line-height: 1.82;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0;
}

.detail-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
}

.text-panel h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.text-panel h2:not(:first-child) {
    margin-top: 28px;
}

.detail-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-list a,
.side-list span {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.side-list strong {
    color: var(--ink);
}

.related-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

.footer-brand {
    color: #ffffff;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hide-card {
    display: none !important;
}

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

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

    .header-search {
        margin-left: auto;
    }

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

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

    .detail-hero,
    .detail-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .header-search {
        display: none;
    }

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

    .hero-content {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding: 26px;
    }

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

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

    .category-grid,
    .info-grid,
    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }

    .rank-action {
        display: none;
    }

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

@media (max-width: 520px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand span:last-child {
        display: none;
    }

    .main-wrap,
    .section-wrap,
    .detail-hero,
    .detail-body,
    .related-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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