:root {
    --bg: #f8fafc;
    --bg-soft: #eef8ff;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --white: #ffffff;
    --orange: #f97316;
    --rose: #f43f5e;
    --pink: #ec4899;
    --amber: #f59e0b;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.32);
}

.brand-name {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
}

.nav-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: var(--text);
    background: #f1f5f9;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(120deg, var(--orange), var(--rose) 45%, var(--pink));
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.26), transparent 28%),
        radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.12));
}

.hero-slider {
    position: relative;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 72px 22px 84px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 52px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 760px;
    margin: 0 0 30px;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.8;
    opacity: 0.92;
}

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

.hero-pills {
    margin-top: 30px;
}

.hero-pills span,
.info-pill {
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.btn-primary,
.btn-ghost,
.btn-light,
.card-bottom a,
.detail-action,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.detail-action {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.32);
}

.btn-primary:hover,
.detail-action:hover,
.card-bottom a:hover,
.page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(244, 63, 94, 0.24);
}

.btn-light {
    color: #e11d48;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-art {
    position: relative;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.38);
    transform: rotate(2deg);
}

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

.hero-poster::after,
.movie-poster::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.72));
}

.hero-floating-card {
    position: absolute;
    left: -28px;
    bottom: 36px;
    max-width: 250px;
    border-radius: 22px;
    padding: 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-floating-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 30px;
    color: #e11d48;
}

.hero-dots {
    position: absolute;
    left: 22px;
    bottom: 30px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 44px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--white);
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 74px;
    background: linear-gradient(0deg, var(--bg), rgba(248, 250, 252, 0));
}

.main-section,
.detail-main,
.page-hero,
.category-grid-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 22px;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: var(--white);
    font-weight: 950;
}

.play-chip {
    right: 14px;
    bottom: 14px;
    border-radius: 999px;
    padding: 8px 12px;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.rank-badge {
    left: 14px;
    top: 14px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.movie-info {
    padding: 18px;
}

.movie-meta-line,
.card-bottom,
.detail-meta,
.breadcrumb,
.video-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.movie-meta-line {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.movie-info h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 950;
}

.movie-info h3 a:hover {
    color: var(--rose);
}

.movie-info p {
    min-height: 66px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
}

.tag-list span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #e11d48;
    background: #fff1f2;
    font-size: 12px;
    font-weight: 800;
}

.card-bottom {
    justify-content: space-between;
    margin-top: 16px;
}

.card-bottom strong {
    font-size: 22px;
    color: var(--amber);
}

.card-bottom a {
    min-height: 36px;
    padding: 0 14px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.feature-band {
    background: linear-gradient(90deg, #f3e8ff, #ffe4e6, #ffedd5);
}

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

.category-card {
    min-height: 190px;
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 200px;
    gap: 14px;
    margin-bottom: 32px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: var(--text);
    background: var(--white);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.page-hero {
    padding-bottom: 34px;
}

.page-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: 54px;
    color: var(--white);
    background: linear-gradient(120deg, var(--orange), var(--rose), var(--pink));
    box-shadow: var(--shadow);
}

.page-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.34), transparent 28%);
}

.page-hero-card > * {
    position: relative;
}

.page-hero-card p {
    color: rgba(255, 255, 255, 0.9);
}

.detail-main {
    padding-top: 34px;
}

.breadcrumb {
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--rose);
}

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

.player-shell {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.video-overlay.hidden {
    display: none;
}

.video-play-icon {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-size: 42px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 22px 54px rgba(244, 63, 94, 0.42);
}

.detail-panel,
.detail-side-card,
.content-block {
    border-radius: 26px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.detail-panel {
    margin-top: 22px;
}

.detail-title h1 {
    margin-bottom: 12px;
}

.detail-meta span,
.video-stats span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #be123c;
    background: #fff1f2;
    font-weight: 900;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
}

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

.content-block {
    margin-top: 22px;
}

.content-block h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-block p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.related-section {
    margin-top: 44px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 42px;
}

.page-link {
    border: 1px solid var(--line);
    color: #475569;
    background: var(--white);
}

.page-link.current {
    color: var(--white);
    border-color: transparent;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.empty-state {
    display: none;
    border-radius: 24px;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-inner p {
    max-width: 620px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 12px 18px;
}

.footer-links a:hover {
    color: var(--white);
}

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

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

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

    .detail-side-card {
        max-width: 420px;
    }
}

@media (max-width: 820px) {
    .mobile-menu-btn {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 12px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
    }

    .hero,
    .hero-slider {
        min-height: auto;
    }

    .hero-slider {
        padding-top: 46px;
        padding-bottom: 72px;
    }

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

    .hero-floating-card {
        left: 18px;
        right: 18px;
        max-width: none;
    }

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

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

    .section-heading,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
    }

    .page-hero-card {
        padding: 36px 24px;
    }
}

@media (max-width: 520px) {
    .top-nav,
    .main-section,
    .detail-main,
    .page-hero,
    .category-grid-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .movie-info p {
        min-height: auto;
    }

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