* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.16), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, #38bdf8, #6366f1 48%, #a855f7);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.38);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.92);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(71, 85, 105, 0.85);
    border-radius: 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

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

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.75s ease, transform 1.2s ease;
}

.hero-bg.is-active {
    opacity: 0.35;
    transform: scale(1);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.25)),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.7fr);
    align-items: center;
    gap: 48px;
    padding: 76px 0 88px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.hero-title {
    margin: 22px 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-lead {
    margin: 0 0 24px;
    max-width: 680px;
    color: #cbd5e1;
    font-size: 18px;
}

.meta-row,
.tag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #6366f1 52%, #a855f7);
    color: #ffffff;
    box-shadow: 0 20px 44px rgba(79, 70, 229, 0.35);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.hero-panel {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72));
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
}

.hero-poster-wrap {
    position: relative;
    aspect-ratio: 4 / 5.4;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.hero-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 20px 20px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-poster-info strong {
    display: block;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.25;
}

.hero-poster-info span {
    display: block;
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 14px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #38bdf8;
}

.section {
    padding: 54px 0;
}

.section.compact {
    padding-top: 32px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 10px 0 0;
    max-width: 760px;
    color: #94a3b8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(71, 85, 105, 0.9);
    border-radius: 14px;
    outline: none;
    background: rgba(2, 6, 23, 0.66);
    color: #e2e8f0;
    padding: 0 14px;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

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

.movie-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(125, 211, 252, 0.52);
    box-shadow: 0 22px 50px rgba(2, 6, 23, 0.42);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.card-desc {
    min-height: 44px;
    margin: 8px 0 12px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 188px;
    padding: 22px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.17), transparent 11rem),
        linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.88));
    transition: transform 0.24s ease, border 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 211, 252, 0.52);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 20px;
    color: #94a3b8;
    font-size: 14px;
}

.category-preview {
    display: flex;
    gap: 8px;
}

.category-preview img {
    width: 48px;
    height: 66px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 74px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 211, 252, 0.52);
}

.rank-number {
    color: #38bdf8;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    width: 74px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-main strong {
    display: block;
    color: #ffffff;
    font-size: 17px;
}

.rank-main p {
    margin: 5px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

.rank-score {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(56, 189, 248, 0.12);
    color: #e0f2fe;
    font-weight: 900;
}

.detail-hero {
    padding: 42px 0 26px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.86);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
}

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

.detail-title {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-lead {
    max-width: 860px;
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 18px;
}

.content-card {
    border: 1px solid rgba(51, 65, 85, 0.82);
    border-radius: 24px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.content-card h2,
.content-card h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 14px;
    color: #cbd5e1;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    background: #020617;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-play {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.94);
    color: #020617;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.42);
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid currentColor;
}

.footer {
    margin-top: 64px;
    border-top: 1px solid rgba(51, 65, 85, 0.82);
    background: rgba(2, 6, 23, 0.62);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #94a3b8;
    font-size: 14px;
}

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

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

.empty-state {
    display: none;
    padding: 34px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 24px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

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

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

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

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

    .mobile-toggle {
        display: inline-block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        padding: 14px;
        border: 1px solid rgba(51, 65, 85, 0.9);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
    }

    .nav-links.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero,
    .hero-inner {
        min-height: 720px;
    }

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

    .hero-panel {
        max-width: 360px;
    }

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

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

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

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

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

    .rank-score {
        display: none;
    }
}

@media (max-width: 620px) {
    .container,
    .header-inner,
    .footer-inner {
        width: min(100% - 24px, 1200px);
    }

    .hero-title {
        font-size: 42px;
    }

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

    .section {
        padding: 38px 0;
    }

    .section-heading {
        display: block;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-desc {
        display: none;
    }

    .content-card {
        padding: 18px;
    }

    .footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 12px;
    }
}
