:root {
    --bg: #f6f8ff;
    --surface: #ffffff;
    --surface-soft: #eef4ff;
    --text: #101828;
    --muted: #667085;
    --line: #dbe4f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --orange: #f59e0b;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 28rem),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 45%, #ffffff 100%);
    line-height: 1.65;
}

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(219, 228, 240, 0.8);
}

.nav-bar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 13px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    padding: 10px 14px;
    color: #344054;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
    color: var(--blue);
    background: rgba(37, 99, 235, 0.08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface);
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #081225;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(6, 182, 212, 0.55), transparent 24rem),
        radial-gradient(circle at 15% 30%, rgba(37, 99, 235, 0.48), transparent 26rem),
        linear-gradient(135deg, #06142e 0%, #0f2d66 52%, #111827 100%);
}

.hero-wrap {
    position: relative;
    padding: 76px 0 42px;
}

.hero-slider {
    position: relative;
    min-height: 505px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 390px;
    gap: 44px;
    align-items: center;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow,
.detail-hero .eyebrow {
    color: #93c5fd;
}

.hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-desc,
.lead {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #475467;
    background: #f2f4f7;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span,
.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

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

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

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

.hero-poster,
.detail-cover,
.category-cover,
.poster,
.rank-poster,
.category-tile {
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, rgba(15, 23, 42, 0) 18%, rgba(15, 23, 42, 0.88) 100%),
        var(--poster-url),
        radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.85), transparent 22rem),
        linear-gradient(135deg, #1e3a8a, #111827);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.hero-poster {
    min-height: 500px;
    border-radius: 32px;
    transform: rotate(1deg);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster span,
.detail-cover span,
.poster-title,
.category-cover span,
.category-tile span {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.36);
}

.hero-dots {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 18px 2px 2px;
}

.hero-dot {
    flex: 0 0 auto;
    max-width: 210px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-dot.is-active {
    color: #0f172a;
    background: #ffffff;
}

.search-panel,
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 560px);
    gap: 24px;
    align-items: center;
    margin-top: -42px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 228, 240, 0.8);
    border-radius: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-head h2,
.page-title h1,
.player-card h2,
.text-block h2,
.category-card h2,
.rank-row h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.search-panel h2,
.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.search-form,
.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-form input,
.filter-panel input {
    flex: 1 1 260px;
    min-height: 48px;
    padding: 0 16px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
}

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

.section,
.page-main {
    padding: 72px 0;
}

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

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link,
.text-link {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(219, 228, 240, 0.86);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    display: block;
    min-height: 270px;
}

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

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 10px 0 6px;
    font-size: 18px;
    line-height: 1.25;
}

.card-body p,
.category-card p,
.rank-row p,
.player-card p,
.text-block p,
.page-title p,
.site-footer p {
    color: var(--muted);
}

.card-body p {
    min-height: 52px;
    margin: 0 0 12px;
    font-size: 14px;
}

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

.category-tile {
    min-height: 170px;
    border-radius: 24px;
}

.category-tile strong {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #ffffff;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.rank-list,
.rank-full {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: var(--blue);
}

.rank-no {
    color: var(--blue);
    font-size: 20px;
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-extra {
    color: var(--muted);
    font-size: 14px;
}

.page-title {
    max-width: 850px;
    margin-bottom: 28px;
}

.page-title h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.compact-title h1 {
    font-size: clamp(34px, 5vw, 56px);
}

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

.category-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.category-cover {
    min-height: 150px;
    border-radius: 20px;
}

.filter-panel {
    grid-template-columns: 1fr;
    margin: 0 0 26px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    min-height: 36px;
    padding: 0 14px;
    color: #475467;
    background: #f2f4f7;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #ffffff;
    background: var(--blue);
}

.rank-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
}

.rank-poster {
    min-height: 150px;
    border-radius: 18px;
}

.rank-poster span {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 12px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    color: #ffffff;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(8, 18, 37, 0.95), rgba(8, 18, 37, 0.7), rgba(8, 18, 37, 0.9)),
        var(--poster-url),
        radial-gradient(circle at 70% 20%, rgba(37, 99, 235, 0.55), transparent 30rem),
        linear-gradient(135deg, #06142e, #111827);
    background-position: center;
    background-size: cover;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 70px 0;
}

.detail-cover {
    min-height: 460px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.detail-info h1 {
    font-size: clamp(38px, 7vw, 76px);
}

.detail-tags {
    margin: 20px 0 28px;
}

.detail-main {
    padding: 56px 0 80px;
}

.player-card,
.text-block {
    margin-bottom: 26px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    color: #ffffff;
    background-image:
        linear-gradient(180deg, rgba(8, 18, 37, 0.08), rgba(8, 18, 37, 0.92)),
        var(--poster-url),
        radial-gradient(circle at center, rgba(37, 99, 235, 0.55), transparent 28rem),
        linear-gradient(135deg, #0f2d66, #111827);
    background-size: cover;
    background-position: center;
    border: 0;
    cursor: pointer;
}

.play-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    padding-left: 4px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 999px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
    font-size: 32px;
}

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

.site-footer {
    padding: 42px 0;
    background: #081225;
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 26px;
}

.site-footer p,
.site-footer a {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer a {
    display: block;
    margin-top: 8px;
}

.site-footer h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .movie-grid,
    .wide-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .hero-poster,
    .detail-cover {
        min-height: 380px;
    }
}

@media (max-width: 760px) {
    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 780px;
    }

    .hero-wrap {
        padding-top: 48px;
    }

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

    .hero-slide {
        gap: 24px;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -28px;
    }

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

    .movie-grid,
    .wide-grid,
    .related-grid,
    .category-grid,
    .category-card-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-card,
    .rank-row {
        grid-template-columns: 1fr;
    }

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

    .rank-extra {
        grid-column: 2;
    }

    .poster {
        min-height: 320px;
    }
}
