:root {
    --page-bg: #f5f7fb;
    --panel-bg: #ffffff;
    --ink: #111827;
    --muted: #5b667a;
    --muted-soft: #e6ebf3;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f97316;
    --dark: #08111f;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--page-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(100deg, #2563eb, #1d4ed8 48%, #172554);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #1d4ed8;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.22);
}

.logo-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: min(360px, 34vw);
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 8px 12px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button {
    border: 0;
    border-radius: 999px;
    color: #1d4ed8;
    background: #ffffff;
    padding: 8px 16px;
    font-weight: 700;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #071424;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.42), transparent 32%),
        radial-gradient(circle at 76% 20%, rgba(249, 115, 22, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(8, 17, 31, 0.96), rgba(23, 37, 84, 0.72));
    z-index: 2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 70px;
    z-index: 3;
}

.hero-slide.is-active {
    display: grid;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #93c5fd;
}

.hero h1,
.section-heading h1,
.detail-info h1 {
    margin: 8px 0 14px;
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.detail-info .primary-button {
    margin-top: 26px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
}

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

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    z-index: 4;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) saturate(1.2);
    opacity: 0.22;
    transform: scale(1.08);
    z-index: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.page-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.top-space {
    padding-top: 38px;
}

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

.section-heading h1 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
    color: var(--primary);
    font-weight: 800;
}

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

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

.category-card a {
    position: relative;
    display: block;
    min-height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    color: #ffffff;
    background: #172554;
    box-shadow: var(--soft-shadow);
}

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

.category-card div {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    background: linear-gradient(180deg, transparent, rgba(8, 17, 31, 0.92));
}

.category-card span {
    display: block;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
}

.category-card h2 {
    margin: 5px 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

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

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

.movie-card,
.compact-card,
.ranking-item,
.detail-content article,
.filter-panel {
    border: 1px solid var(--muted-soft);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: var(--soft-shadow);
}

.movie-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

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

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

.movie-card h2 {
    margin: 7px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 54px 90px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    align-items: center;
}

.ranking-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #172554);
    font-weight: 900;
}

.ranking-poster img {
    width: 90px;
    height: 118px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-item h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.ranking-item p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

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

.compact-card {
    padding: 10px;
    overflow: hidden;
}

.compact-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.compact-card span {
    display: block;
    margin-top: 10px;
    font-weight: 800;
    line-height: 1.35;
}

.compact-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 24px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-keyword {
    margin-bottom: 14px;
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--muted-soft);
    border-radius: 14px;
    outline: 0;
    color: var(--ink);
    background: #f8fafc;
    padding: 0 12px;
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: #ffffff;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    margin-top: 22px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.36), transparent 36%),
        linear-gradient(135deg, #08111f, #172554);
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    border-radius: 22px;
    aspect-ratio: 3 / 4.05;
    object-fit: cover;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
    color: #ffffff;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.player-section {
    margin: 34px 0;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(8, 17, 31, 0.1), rgba(8, 17, 31, 0.68));
}

.play-mask span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
    font-size: 32px;
    transform: translateX(3px);
}

.player-section.is-playing .play-mask {
    display: none;
}

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

.detail-content article {
    padding: 24px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    color: #d1d5db;
    background: #08111f;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .hero {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 54px;
    }

    .hero-poster {
        max-width: 260px;
        margin: 0 auto;
    }

    .category-grid,
    .category-grid.expanded,
    .movie-grid,
    .ranking-list,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-cover {
        max-width: 260px;
    }

    .filter-fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
    }

    .logo-text {
        font-size: 18px;
    }

    .mobile-nav.is-open,
    .category-grid,
    .category-grid.expanded,
    .movie-grid,
    .ranking-list,
    .compact-grid,
    .detail-content,
    .footer-grid,
    .filter-fields {
        grid-template-columns: 1fr;
    }

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

    .hero-actions {
        display: grid;
        gap: 10px;
    }

    .ghost-button {
        margin-left: 0;
    }

    .ranking-item {
        grid-template-columns: 48px 78px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-poster img {
        width: 78px;
        height: 104px;
    }
}
