:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.86);
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --slate: #0f172a;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    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:
        radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.15), transparent 32rem),
        radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.15), transparent 36rem),
        var(--bg);
}

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

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

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

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-text,
.gradient-text {
    color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
}

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

.nav-link,
.mobile-link {
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--blue);
    background: #eff6ff;
}

.header-search,
.mobile-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 290px;
}

.header-search input,
.mobile-search input,
.toolbar input,
.toolbar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.btn,
.source-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.btn.alt {
    color: var(--blue);
    background: #eff6ff;
    box-shadow: none;
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: var(--text);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--line);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 22px 60px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.34)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 86px 22px 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 46px;
}

.hero-text {
    max-width: 740px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(125, 211, 252, 0.28);
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 14px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 24px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.tag,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #0369a1;
    background: #e0f2fe;
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 -90px 80px rgba(2, 6, 23, 0.58);
}

.hero-poster-title {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2;
    font-size: 20px;
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hero-dot.active {
    background: #ffffff;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin: 46px 0 22px;
}

.section-head h1,
.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card,
.info-card,
.category-card,
.detail-panel,
.player-card,
.rank-card {
    background: var(--panel-soft);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

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

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

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

.poster-year {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    font-weight: 900;
    font-size: 12px;
}

.card-body {
    padding: 16px;
}

.card-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

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

.card-body p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    padding: 22px;
    min-height: 164px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.10)),
        var(--panel-soft);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

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

.category-card span {
    color: var(--blue);
    font-weight: 900;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    margin: 22px 0;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.category-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: #334155;
    font-weight: 800;
}

.category-chip.active,
.category-chip:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

.rank-card {
    padding: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 10px;
    border-radius: 16px;
    align-items: center;
}

.rank-row:hover {
    background: #eff6ff;
}

.rank-num {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.rank-title {
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 30px;
    align-items: end;
    padding: 30px;
    border-radius: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9));
    box-shadow: var(--shadow);
}

.detail-hero img {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-hero h1 {
    margin: 12px 0 12px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-hero p {
    color: #dbeafe;
    line-height: 1.85;
    font-size: 17px;
}

.breadcrumb {
    margin-bottom: 18px;
    color: #dbeafe;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    margin-top: 28px;
}

.detail-panel,
.player-card {
    padding: 24px;
}

.detail-panel h2,
.player-card h2,
.rank-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-panel p {
    color: #334155;
    line-height: 1.9;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-trigger {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    border: 0;
    cursor: pointer;
}

.play-trigger.hidden {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.4);
    font-size: 30px;
}

.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.source-button.active {
    outline: 3px solid rgba(6, 182, 212, 0.24);
}

.site-footer {
    margin-top: 52px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b 48%, #0f172a);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
}

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

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

.footer-grid p {
    line-height: 1.8;
    margin: 0;
}

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

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

.empty-state {
    display: none;
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--muted);
}

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

    .hero-content,
    .rank-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 330px;
    }
}

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-panel.open {
        display: grid;
        gap: 10px;
    }

    .mobile-search {
        min-width: 0;
        margin-left: 0;
    }

    .hero,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        padding-top: 58px;
    }

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

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

    .detail-hero img {
        max-width: 260px;
    }

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

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

@media (max-width: 480px) {
    .grid,
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }
}
