
:root {
    --bg: #f7fbff;
    --text: #1f2937;
    --muted: #64748b;
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent: #ec4899;
    --card: #ffffff;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #ecfeff 0%, #ffffff 48%, #fdf2f8 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(240, 253, 250, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-bar {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(6, 182, 212, 0.3);
}

.brand-text {
    font-size: clamp(18px, 2vw, 24px);
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
    color: #334155;
    overflow: hidden;
    white-space: nowrap;
}

.main-nav a:hover,
.more-link:hover,
.card-title:hover {
    color: var(--primary-dark);
}

.nav-search {
    display: flex;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.nav-search input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    padding: 12px 16px;
    font: inherit;
    background: #fff;
}

.nav-search button,
.btn,
.filter-bar select {
    border: 0;
    cursor: pointer;
}

.nav-search button {
    padding: 0 18px;
    color: #fff;
    background: var(--primary);
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
}

.hero-carousel {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-bg,
.category-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-bg {
    transform: scale(1.05);
    filter: saturate(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 20%, rgba(236, 72, 153, 0.28), transparent 35%),
                linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: relative;
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 44px;
    align-items: center;
    color: #fff;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 10px 0 18px;
    line-height: 1.08;
    font-size: clamp(34px, 6vw, 68px);
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2vw, 20px);
}

.eyebrow,
.section-kicker {
    color: #facc15;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 34px rgba(236, 72, 153, 0.25);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.btn.ghost.dark {
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    aspect-ratio: 3 / 4.2;
    background: linear-gradient(135deg, #0891b2, #ec4899);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

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

.section {
    padding: 58px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

.section-heading.light,
.section-heading.light .section-kicker {
    color: #fff;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--primary-dark);
}

.more-link {
    font-weight: 800;
    color: #475569;
}

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

.movie-card,
.category-card-large,
.rank-card,
.player-card,
.detail-content article {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.movie-card {
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0891b2 55%, #ec4899);
}

.poster-wrap::after {
    content: attr(aria-label);
    position: absolute;
    inset: auto 14px 14px 14px;
    display: none;
    color: #fff;
    font-weight: 800;
}

.poster-wrap.missing-poster::after {
    display: block;
}

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

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

.duration,
.rank-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 3.2em;
    overflow: hidden;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    min-height: 3.2em;
    overflow: hidden;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.card-meta a,
.card-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 1fr 70px 80px;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.rank-index {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

.category-section {
    background: linear-gradient(135deg, #0891b2, #1d4ed8 45%, #be185d);
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
}

.category-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
}

.category-bg {
    z-index: -2;
    transition: transform 400ms ease;
}

.category-tile:hover .category-bg {
    transform: scale(1.08);
}

.category-name {
    font-size: 22px;
    font-weight: 900;
}

.category-count {
    color: rgba(255, 255, 255, 0.76);
}

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

.wide-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.wide-card .poster-wrap {
    aspect-ratio: auto;
    min-height: 100%;
}

.page-hero {
    position: relative;
    color: #fff;
    background: radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.36), transparent 35%),
                linear-gradient(135deg, #0f172a, #0e7490 52%, #831843);
}

.page-hero.compact {
    padding: 72px 0 52px;
}

.page-hero h1 {
    max-width: 900px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.12);
}

.filter-bar input {
    min-width: min(420px, 100%);
}

.result-count {
    color: rgba(255, 255, 255, 0.8);
}

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

.category-card-large {
    padding: 26px;
}

.category-title {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-dark);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 13px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    overflow: hidden;
}

.rank-card > div {
    padding: 18px 18px 18px 0;
}

.rank-card p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.detail-bg {
    filter: blur(6px) saturate(1.08);
    transform: scale(1.04);
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.25));
}

.detail-layout {
    position: relative;
    min-height: 520px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    aspect-ratio: 3 / 4.2;
}

.detail-info h1 {
    max-width: 900px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 860px;
    margin: 22px 0;
}

.detail-meta div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.player-card {
    padding: 24px;
}

.player-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.player-heading h2 {
    margin: 0;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.62), rgba(8, 145, 178, 0.22));
    cursor: pointer;
}

.play-overlay span {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 28px;
    box-shadow: 0 18px 45px rgba(236, 72, 153, 0.3);
}

.play-overlay.is-hidden {
    display: none;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 14px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(2, 6, 23, 0.72);
    font-size: 13px;
}

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

.detail-content article {
    padding: 28px;
}

.detail-content h2 {
    margin-top: 0;
}

.site-footer {
    margin-top: 40px;
    padding: 52px 0;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 60%, #172554);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
    color: #67e8f9;
}

.site-footer h3 {
    color: #fff;
}

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

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

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

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .nav-search {
        display: none;
    }

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--shadow);
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        padding: 70px 0 88px;
    }

    .hero-poster {
        display: none;
    }

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

    .category-overview,
    .featured-list,
    .rank-panel {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

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

    .wide-card,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .rank-card > div {
        padding: 18px;
    }

    .detail-poster {
        max-width: 230px;
        margin-top: 26px;
    }

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

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-year,
    .rank-heat {
        display: none;
    }
}
