:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --card: #ffffff;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --teal: #0d9488;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef6fb 45%, #f8fafc 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.96), rgba(37, 99, 235, 0.96), rgba(13, 148, 136, 0.96));
    color: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.brand-text {
    font-size: 1.1rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
    white-space: nowrap;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    opacity: 0.94;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.top-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
}

.top-search button,
.btn,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn:hover,
.top-search button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 1.2rem;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.38), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.28)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 72vh;
    margin: 0 auto;
    padding: 86px 24px 92px;
    display: flex;
    align-items: center;
}

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

.eyebrow,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.28);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.30);
    font-weight: 800;
    font-size: 0.88rem;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 22px 50px rgba(0, 0, 0, 0.40);
}

.hero p {
    max-width: 640px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 1.08rem;
}

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

.btn.secondary {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

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

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

.section,
.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

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

.section-title h2,
.page-title h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card .poster-link {
    display: block;
    height: 100%;
    background: var(--card);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
    opacity: 0.78;
}

.play-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 0.82rem;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line,
.one-line {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.one-line {
    min-height: 3em;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 0.76rem;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 168px;
    padding: 22px;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb 55%, #0d9488);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0 0 18px;
    color: #dbeafe;
}

.category-card .count {
    font-size: 2rem;
    font-weight: 900;
}

.search-panel {
    padding: 22px;
    margin: 28px 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: 1fr 180px 160px auto;
    gap: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(1.15);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(34, 211, 238, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72));
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    background: linear-gradient(135deg, #0f172a, #164e63);
}

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

.detail-copy h1 {
    margin: 14px 0 14px;
    font-size: clamp(2.1rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-copy p {
    color: #dbeafe;
    font-size: 1.05rem;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 18px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.30);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.70), rgba(2, 6, 23, 0.25));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.hidden {
    opacity: 0;
    visibility: hidden;
}

.play-button-large {
    width: 98px;
    height: 98px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 2.1rem;
    cursor: pointer;
    box-shadow: 0 22px 55px rgba(37, 99, 235, 0.45);
}

.content-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 26px 24px 54px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 34px;
}

.content-card {
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.content-card h3 {
    margin: 0 0 14px;
}

.content-card p {
    margin: 0 0 18px;
    color: #334155;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.side-item img {
    width: 72px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.side-item strong {
    display: block;
    line-height: 1.35;
}

.side-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.pagination-note {
    margin-top: 24px;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.site-footer h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer li {
    margin: 8px 0;
}

.site-footer a:hover {
    color: #22d3ee;
}

.contact {
    color: #93c5fd;
}

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

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

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

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

@media (max-width: 860px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-nav,
    .top-search {
        display: none;
        width: 100%;
    }

    .main-nav.open,
    .top-search.open {
        display: flex;
    }

    .main-nav.open {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 0;
    }

    .top-search.open {
        min-width: 0;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

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

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

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

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

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

@media (max-width: 520px) {
    .section,
    .page-shell,
    .player-section,
    .content-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

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

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