* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #020617;
    color: #e5e7eb;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.24), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: #ffffff;
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.brand-name {
    font-size: 1.08rem;
    color: #f8fafc;
}

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

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

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.14);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    width: min(1240px, calc(100% - 32px));
    min-height: 620px;
    margin: 28px auto 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
    overflow: hidden;
}

.hero-slides {
    position: relative;
    min-height: 590px;
    border-radius: 26px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease, visibility 0.8s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.2)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 56px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #22d3ee;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 20px 0 0;
    color: #d1d5db;
    font-size: 1.05rem;
}

.hero-tags,
.detail-tags,
.tag-line,
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.pill-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    font-size: 0.78rem;
}

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

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

.primary-btn,
.hero-search button {
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: #ffffff;
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.28);
}

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

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

.hero-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hero-search {
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.76);
}

.hero-search.narrow {
    width: min(520px, 100%);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    outline: none;
}

.hero-search input {
    padding: 0 16px;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.78);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.hero-mini-list {
    flex: 1;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.72);
}

.hero-mini-list h2 {
    margin: 0 0 14px;
    color: #f8fafc;
    font-size: 1.1rem;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    color: #e5e7eb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
    background: rgba(34, 211, 238, 0.1);
    transform: translateX(2px);
}

.hero-mini-card img {
    width: 72px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
}

.hero-mini-card span {
    font-weight: 700;
}

.hero-quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hero-quick-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 18px;
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 52px;
    bottom: 38px;
    z-index: 8;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 32px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.hero-dot.active {
    background: #22d3ee;
}

.section-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 72px auto;
}

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

.section-title-row h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    letter-spacing: -0.03em;
}

.section-title-row a {
    color: #67e8f9;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 160px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-card.large {
    min-height: 220px;
}

.category-glow {
    position: absolute;
    right: -28px;
    top: -28px;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.18);
    filter: blur(4px);
}

.category-card h2 {
    position: relative;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.24rem;
}

.category-card p {
    position: relative;
    margin: 0;
    color: #94a3b8;
    font-size: 0.94rem;
}

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

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

.movie-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.46);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 44%);
}

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.year-badge {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    background: rgba(2, 6, 23, 0.8);
    color: #ffffff;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #111827;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h2 {
    display: -webkit-box;
    min-height: 2.9em;
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1.05rem;
    line-height: 1.45;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 4.6em;
    margin: 0 0 12px;
    color: #94a3b8;
    font-size: 0.9rem;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card.compact .movie-card-body {
    padding: 13px;
}

.movie-card.compact h2 {
    font-size: 0.95rem;
}

.movie-card.compact p {
    min-height: 3.8em;
    -webkit-line-clamp: 2;
}

.page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: clamp(38px, 8vw, 90px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.category-hero {
    display: block;
}

.pill-row {
    margin-top: 26px;
}

.pill-link.active,
.pill-link:hover {
    background: rgba(34, 211, 238, 0.2);
    color: #ffffff;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 210px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.filter-panel input,
.filter-panel select {
    padding: 0 14px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 24px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    min-height: 420px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 30px;
    background: #000000;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
}

.player-shell video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #000000;
    cursor: pointer;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    filter: blur(1px) saturate(1.05);
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1), rgba(2, 6, 23, 0.76));
}

.play-orb {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 18px 58px rgba(34, 211, 238, 0.42);
}

.detail-info {
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.76);
}

.detail-info h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.detail-meta span {
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.62);
    color: #e2e8f0;
    font-weight: 700;
}

.detail-content-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card {
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
}

.content-card h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 1.45rem;
}

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

.site-footer {
    margin-top: 90px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 28px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-brand p {
    max-width: 420px;
    color: #94a3b8;
}

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

.footer-links h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1rem;
}

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
}

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

@media (max-width: 1100px) {
    .hero-carousel {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .main-nav a {
        border-radius: 12px;
    }

    .hero-content {
        padding: 34px 24px 78px;
    }

    .hero-slides {
        min-height: 560px;
    }

    .hero-dots {
        left: 38px;
    }

    .page-hero {
        display: block;
        padding: 34px 24px;
    }

    .hero-search {
        margin-top: 22px;
    }

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

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

    .player-shell {
        min-height: 300px;
    }

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

@media (max-width: 520px) {
    .header-inner,
    .section-wrap,
    .detail-hero,
    .page-hero,
    .hero-carousel,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 20px, 1200px);
    }

    .hero-carousel {
        padding: 8px;
        border-radius: 24px;
    }

    .hero-slides {
        min-height: 520px;
        border-radius: 20px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.1rem;
    }

    .hero-search,
    .hero-actions {
        flex-direction: column;
    }

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

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