:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #e5e7eb;
    --rose: #e11d48;
    --rose-dark: #9f1239;
    --pink: #db2777;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.nav-wrap {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 22px;
    background: linear-gradient(135deg, #f43f5e, #db2777);
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(135deg, #e11d48, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    color: #374151;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--rose);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--rose);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 8px 24px 18px;
    border-top: 1px solid #ffe4e6;
    background: #fff;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
}

.mobile-nav.is-open {
    display: block;
}

.home-hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: linear-gradient(135deg, #881337, #be185d 46%, #9f1239);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(720px, calc(100% - 48px));
    margin: 0 auto;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #f43f5e;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 660px;
    margin: 22px 0 0;
    color: #e5e7eb;
    font-size: 19px;
}

.hero-tags,
.detail-tags,
.tag-row,
.rank-meta,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.movie-meta span,
.detail-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(4px);
}

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

.primary-button,
.secondary-button,
.section-link,
.rank-link,
.card-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 28px;
    color: #fff;
    background: #f43f5e;
    box-shadow: 0 18px 30px rgba(244, 63, 94, 0.35);
}

.primary-button:hover,
.rank-link:hover,
.card-actions a:first-child:hover {
    transform: translateY(-2px);
    background: #e11d48;
}

.secondary-button {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.secondary-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section,
.page-section,
.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.lifted-panels {
    position: relative;
    z-index: 6;
    max-width: 1280px;
    margin: -72px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.quick-panel {
    min-height: 140px;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.quick-panel strong {
    display: block;
    margin-bottom: 6px;
    font-size: 30px;
    line-height: 1;
}

.quick-panel span {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.quick-panel:nth-child(1) {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.quick-panel:nth-child(2) {
    background: linear-gradient(135deg, #10b981, #059669);
}

.quick-panel:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.quick-panel:nth-child(4) {
    background: linear-gradient(135deg, #8b5cf6, #c026d3);
}

.section-head,
.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-head h2,
.page-head h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.section-link {
    min-height: 40px;
    padding: 0 18px;
    color: var(--rose);
    background: #fff1f2;
}

.section-link:hover {
    color: #fff;
    background: var(--rose);
}

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

.movie-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fb7185, #be185d);
}

.movie-cover img,
.category-tile img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-cover img,
.category-tile:hover img,
.rank-item:hover .rank-cover img {
    transform: scale(1.06);
}

.cover-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(225, 29, 72, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.cover-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .cover-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 18px;
}

.movie-meta span,
.rank-meta span,
.detail-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

.movie-info h3 {
    margin: 12px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

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

.movie-info p,
.rank-body p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    background: #fff1f2;
    color: #be123c;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.card-actions a {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.card-actions a:first-child {
    color: #fff;
    background: #f43f5e;
}

.card-actions a:last-child {
    color: #be123c;
    background: #fff1f2;
}

.category-band {
    background: linear-gradient(135deg, #eef2ff, #fdf2f8 45%, #fff1f2);
}

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

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

.category-tile {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    isolation: isolate;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.15);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.76));
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.56;
}

.category-glow {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.tone-rose .category-glow { background: linear-gradient(135deg, #e11d48, #db2777); }
.tone-indigo .category-glow { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.tone-emerald .category-glow { background: linear-gradient(135deg, #059669, #14b8a6); }
.tone-blue .category-glow { background: linear-gradient(135deg, #2563eb, #0284c7); }
.tone-amber .category-glow { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.tone-purple .category-glow { background: linear-gradient(135deg, #7e22ce, #c026d3); }
.tone-pink .category-glow { background: linear-gradient(135deg, #db2777, #f43f5e); }
.tone-cyan .category-glow { background: linear-gradient(135deg, #0891b2, #2563eb); }
.tone-violet .category-glow { background: linear-gradient(135deg, #6d28d9, #a21caf); }
.tone-slate .category-glow { background: linear-gradient(135deg, #334155, #0f172a); }

.category-tile div {
    padding: 24px;
}

.category-tile span {
    font-size: 13px;
    font-weight: 800;
    opacity: 0.9;
}

.category-tile h3 {
    margin: 8px 0 8px;
    font-size: 26px;
    line-height: 1.1;
}

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

.horizontal-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 260px);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 18px;
    scroll-snap-type: x mandatory;
}

.horizontal-track .movie-card {
    scroll-snap-align: start;
}

.page-hero {
    background: radial-gradient(circle at 20% 0%, rgba(244, 63, 94, 0.25), transparent 28%), linear-gradient(135deg, #fff1f2, #eef2ff);
}

.page-head {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 42px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.empty-state {
    margin: 28px 0 0;
    padding: 28px;
    border-radius: 22px;
    text-align: center;
    background: #fff;
    color: var(--muted);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 92px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f43f5e, #be185d);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #f43f5e, #db2777);
}

.rank-body h3 {
    margin: 8px 0;
    font-size: 22px;
}

.rank-link {
    min-height: 40px;
    padding: 0 18px;
    color: #fff;
    background: #f43f5e;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #881337 60%, #be185d);
    color: #fff;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    filter: blur(10px);
    transform: scale(1.08);
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #fb7185, #be185d);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

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

.detail-title h1 {
    color: #fff;
    font-size: clamp(38px, 6vw, 68px);
}

.detail-title p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.detail-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.player-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 72px 24px 24px;
}

.player-section h2,
.content-card h2,
.related-section h2 {
    margin: 0 0 18px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.28), rgba(2, 6, 23, 0.72));
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: #f43f5e;
    box-shadow: 0 18px 38px rgba(244, 63, 94, 0.42);
}

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

.content-card,
.related-section {
    max-width: 1120px;
    margin: 28px auto 0;
    padding: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.content-card p {
    margin: 0 0 24px;
    color: #374151;
    font-size: 17px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.detail-tags {
    margin-top: 8px;
}

.related-section {
    margin-bottom: 72px;
}

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

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 700;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 24px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .home-hero {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .detail-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

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

    .rank-number,
    .rank-link {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .nav-wrap {
        height: 66px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-copy {
        width: calc(100% - 32px);
    }

    .hero-copy p {
        font-size: 16px;
    }

    .section,
    .page-section,
    .detail-layout,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lifted-panels {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .section-head,
    .page-head {
        display: block;
    }

    .section-link {
        margin-top: 16px;
    }

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

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

    .rank-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-meta {
        gap: 6px;
    }

    .content-card,
    .related-section {
        padding: 24px;
        border-radius: 22px;
    }
}
