:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #dbeafe;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100% - 32px, 1200px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.24);
}

.nav-wrap {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

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

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.site-nav a {
    color: #cbd5e1;
    font-size: 15px;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #60a5fa;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input {
    width: 210px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    color: #ffffff;
    outline: none;
    padding: 10px 14px;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.primary-button {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.header-search button:hover,
.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

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

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 26px;
}

.hero {
    position: relative;
    height: 600px;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800), #334155);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.08));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.hero-copy {
    max-width: 720px;
    animation: fadeIn 0.9s ease both;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.badge.blue {
    color: #1d4ed8;
    background: var(--blue-soft);
}

.hero-kicker .badge {
    color: #ffffff;
    background: var(--blue);
}

.hero-kicker .soft {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.hero h1,
.hero h2 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 30px;
    max-width: 680px;
    color: #e2e8f0;
    font-size: clamp(18px, 2.4vw, 26px);
    line-height: 1.55;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.section {
    padding: 68px 0;
}

.section-light {
    background: #ffffff;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.section-link {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 188px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
    font-size: 24px;
    margin-bottom: 10px;
}

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

.category-card em {
    margin-top: auto;
    color: var(--blue);
    font-style: normal;
    font-weight: 800;
}

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.card-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    background: rgba(2, 6, 23, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-title {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.card-tags span {
    border-radius: 999px;
    padding: 4px 8px;
    color: #334155;
    background: #f1f5f9;
    font-size: 12px;
}

.movie-card-compact .card-desc {
    -webkit-line-clamp: 1;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 82px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-number {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #60a5fa);
    font-weight: 900;
}

.rank-item img {
    width: 82px;
    height: 110px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--slate-900);
}

.rank-content {
    min-width: 0;
}

.rank-content strong,
.rank-content em,
.rank-content small {
    display: block;
}

.rank-content strong {
    font-size: 17px;
    line-height: 1.35;
}

.rank-content em {
    margin: 6px 0;
    color: var(--blue);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.rank-content small {
    color: var(--muted);
    line-height: 1.5;
}

.page-hero {
    padding: 70px 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.toolbar input,
.toolbar select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    background: #f8fafc;
}

.toolbar input {
    min-width: 260px;
    flex: 1;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: #60a5fa;
    background: #ffffff;
}

.detail-hero {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28));
}

.detail-copy {
    position: relative;
    z-index: 1;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 850px;
}

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

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-copy p {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.7;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.detail-main {
    padding: 58px 0 72px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-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: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(0, 0, 0, 0.58));
}

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

.play-bubble {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.38);
    font-size: 38px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .play-bubble {
    transform: scale(1.06);
    background: var(--blue-dark);
}

.content-panel {
    margin-top: 26px;
    padding: 28px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 18px;
    color: #334155;
    line-height: 1.9;
}

.info-panel {
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.info-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.info-list {
    display: grid;
    gap: 12px;
    color: #334155;
}

.info-list div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

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

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer p {
    margin: 16px 0 0;
    line-height: 1.8;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    text-align: center;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 18px;
        background: var(--slate-900);
        box-shadow: 0 20px 40px rgba(2, 6, 23, 0.24);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 13px 6px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    }

    .hero {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

    .category-grid,
    .rank-grid,
    .footer-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 48px 0;
    }

    .section-head {
        display: block;
    }

    .section-link {
        display: inline-block;
        margin-top: 14px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

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

    .hero {
        height: 520px;
        min-height: 500px;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-actions a {
        width: 100%;
        text-align: center;
    }

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

    .rank-item {
        grid-template-columns: 38px 70px 1fr;
        gap: 12px;
    }

    .rank-item img {
        width: 70px;
        height: 96px;
    }

    .toolbar input,
    .toolbar select {
        width: 100%;
        min-width: 0;
    }

    .content-panel,
    .info-panel {
        padding: 22px;
    }
}
