:root {
    --primary: #0284c7;
    --primary-light: #0ea5e9;
    --primary-deep: #0369a1;
    --cyan: #06b6d4;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --dark: #0f172a;
    --radius: 22px;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

* {
    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(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.nav-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    font-size: 22px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.32);
    font-size: 14px;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-deep);
    background: #e0f2fe;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 16px 18px;
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 48%, #06b6d4 100%);
    color: #ffffff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(circle at 20% 25%, rgba(255,255,255,0.7), transparent 22%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.4), transparent 24%), radial-gradient(circle at 60% 80%, rgba(255,255,255,0.28), transparent 30%);
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 132, 199, 0.62) 50%, rgba(6, 182, 212, 0.32) 100%);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 44px;
    padding: 76px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cffafe;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 16px;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(36px, 5.8vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h1 span,
.hero h2 span {
    color: #a5f3fc;
}

.hero p {
    margin: 22px 0 0;
    color: #e0f2fe;
    font-size: 18px;
    max-width: 700px;
}

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

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

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

.btn-primary {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 20px 48px rgba(255, 255, 255, 0.3);
}

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

.hero-panel {
    border-radius: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(16px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.32);
}

.hero-panel h3 {
    margin: 18px 0 6px;
    font-size: 24px;
}

.hero-panel p {
    margin: 0;
    font-size: 14px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-band {
    margin-top: -38px;
    position: relative;
    z-index: 4;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.88);
}

.search-card input,
.filter-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    outline: none;
    font-size: 16px;
    background: #f8fafc;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-card input:focus,
.filter-input:focus {
    border-color: #7dd3fc;
    background: #ffffff;
    box-shadow: 0 0 0 4px #e0f2fe;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
    border-color: #bae6fd;
}

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

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

.poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.poster-year,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(12px);
}

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

.card-body {
    padding: 18px;
}

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

.card-body h3 a:hover {
    color: var(--primary);
}

.movie-meta {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.card-desc {
    min-height: 52px;
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: 28px;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 68px rgba(15, 23, 42, 0.22);
}

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

.category-card strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 22px;
    margin: 18px 0 10px;
}

.category-card p,
.category-icon {
    position: relative;
    z-index: 1;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.category-icon {
    font-size: 36px;
}

.from-red.to-orange {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.from-blue.to-cyan {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.from-pink.to-purple {
    background: linear-gradient(135deg, #ec4899, #9333ea);
}

.from-amber.to-red {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.from-indigo.to-blue {
    background: linear-gradient(135deg, #4f46e5, #0284c7);
}

.from-green.to-teal {
    background: linear-gradient(135deg, #16a34a, #0d9488);
}

.from-stone.to-amber {
    background: linear-gradient(135deg, #57534e, #d97706);
}

.from-cyan.to-sky {
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
}

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

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    font-weight: 900;
}

.rank-cover {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
    background: #e0f2fe;
}

.rank-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    padding: 70px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 52%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 16% 20%, rgba(255,255,255,0.24), transparent 26%), radial-gradient(circle at 84% 26%, rgba(255,255,255,0.18), transparent 26%);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.page-hero p {
    max-width: 720px;
    margin: 18px 0 0;
    color: #e0f2fe;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 28px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pill {
    border: 1px solid var(--line);
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 15px;
    font-weight: 800;
    cursor: pointer;
}

.filter-pill.is-active,
.filter-pill:hover {
    border-color: #7dd3fc;
    color: var(--primary-deep);
    background: #e0f2fe;
}

.detail-hero {
    padding: 64px 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2,132,199,0.96), rgba(37,99,235,0.96), rgba(6,182,212,0.9));
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
    background: #e0f2fe;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cffafe;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.26);
    color: #ffffff;
    font-weight: 750;
}

.detail-intro {
    margin: 0;
    color: #e0f2fe;
    font-size: 18px;
}

.player-section {
    padding: 56px 0 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(2,6,23,0.42), rgba(2,132,199,0.28));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    font-size: 30px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.32);
}

.play-overlay span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.content-card {
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

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

.site-footer {
    margin-top: 56px;
    padding: 48px 0 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.site-footer a {
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #38bdf8;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

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

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

    .hero-panel {
        max-width: 420px;
    }
}

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

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

    .nav-wrap {
        min-height: 64px;
    }

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

    .hero-content {
        gap: 24px;
        padding: 52px 0 84px;
    }

    .hero-actions,
    .section-heading,
    .filter-bar,
    .search-card {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 52px 0;
    }

    .detail-cover {
        max-width: 300px;
    }

    .content-card {
        padding: 24px;
    }
}

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

    .movie-grid {
        gap: 16px;
    }

    .rank-item {
        grid-template-columns: 38px 58px minmax(0, 1fr);
    }

    .rank-cover {
        width: 58px;
        height: 78px;
    }
}
