:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --accent-50: #fff7ed;
    --accent-100: #ffedd5;
    --accent-400: #fb923c;
    --accent-500: #f97316;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 26px 70px rgba(15, 23, 42, 0.22);
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--secondary-50);
    color: var(--secondary-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    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.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1200px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--secondary-900);
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.28);
}

.brand-mark.small {
    width: 34px;
    height: 34px;
}

.brand-mark svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.desktop-nav a {
    padding: 10px 13px;
    color: var(--secondary-700);
    border-radius: 12px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.inline-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--secondary-200);
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.header-search input,
.mobile-search input,
.inline-search input {
    width: 250px;
    min-width: 0;
    padding: 11px 14px;
    color: var(--secondary-800);
    background: transparent;
    border: 0;
    outline: 0;
}

.mobile-search input,
.inline-search input {
    width: 100%;
}

.header-search button,
.mobile-search button,
.inline-search button {
    align-self: stretch;
    padding: 0 16px;
    color: var(--white);
    cursor: pointer;
    background: var(--primary-600);
    border: 0;
    transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.inline-search button:hover {
    background: var(--primary-700);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--secondary-100);
    border: 0;
    border-radius: 12px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--secondary-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    color: var(--secondary-700);
    background: var(--white);
    border-radius: 12px;
}

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: var(--secondary-900);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 18%, rgba(14, 165, 233, 0.38), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.48) 48%, rgba(2, 6, 23, 0.14)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 56%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1200px) / 2));
    bottom: clamp(52px, 10vh, 110px);
    width: min(720px, calc(100% - 48px));
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 16px;
    color: #ffedd5;
    font-weight: 800;
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(251, 146, 60, 0.34);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(241, 245, 249, 0.92);
    font-size: clamp(17px, 2.1vw, 22px);
}

.hero-tags,
.card-tags,
.detail-tags,
.category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span {
    padding: 6px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 800;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    box-shadow: 0 18px 34px rgba(2, 132, 199, 0.32);
}

.button-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
}

.button-light {
    color: var(--primary-800);
    background: rgba(255, 255, 255, 0.92);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1200px) / 2));
    bottom: 52px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

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

.hero-dots button.is-active {
    width: 34px;
    background: var(--white);
}

.section,
.page-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.section-soft {
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.section-head h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--secondary-900);
    font-weight: 850;
    letter-spacing: -0.05em;
}

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

.section-head p,
.page-title p {
    margin: 6px 0 0;
    color: var(--secondary-600);
}

.text-link {
    color: var(--primary-700);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--shadow-md);
}

.movie-card figure {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: var(--secondary-200);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-card-body {
    padding: 18px;
}

.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--secondary-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-row span {
    padding: 3px 8px;
    background: var(--secondary-100);
    border-radius: 999px;
}

.movie-card h2,
.movie-card h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 9px;
    overflow: hidden;
    color: var(--secondary-900);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 850;
    letter-spacing: -0.03em;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--secondary-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags span,
.category-badges span {
    padding: 4px 8px;
    color: var(--secondary-600);
    font-size: 12px;
    font-weight: 700;
    background: var(--secondary-100);
    border-radius: 999px;
}

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

.category-card {
    position: relative;
    min-height: 172px;
    overflow: hidden;
    padding: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-900));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, var(--accent-500), var(--secondary-900));
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 850;
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -44px;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 112px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--secondary-200);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
    border-radius: 14px;
}

.rank-row img {
    width: 112px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: var(--secondary-200);
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 850;
}

.rank-row p {
    margin: 0;
    color: var(--secondary-600);
    font-size: 14px;
}

.rank-score {
    padding: 7px 12px;
    color: var(--primary-800);
    font-weight: 850;
    background: var(--primary-50);
    border-radius: 999px;
}

.page-hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.20), transparent 34%),
        linear-gradient(135deg, var(--white), var(--primary-50));
    border-bottom: 1px solid var(--secondary-200);
}

.page-title {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
}

.page-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--secondary-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-700);
    font-weight: 750;
}

.breadcrumb .slash {
    color: var(--secondary-300);
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin: 28px 0 0;
}

.toolbar .inline-search {
    width: min(620px, 100%);
}

.empty-filter {
    display: none;
    padding: 28px;
    color: var(--secondary-600);
    text-align: center;
    background: var(--white);
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
}

.empty-filter.is-visible {
    display: block;
}

.detail-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 0;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    cursor: pointer;
    background: rgba(2, 6, 23, 0.46);
    border: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-cover span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    padding-left: 5px;
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(2, 132, 199, 0.34);
}

.play-cover strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.detail-copy {
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.detail-copy h1 {
    margin-bottom: 14px;
    font-size: clamp(30px, 3.8vw, 46px);
    line-height: 1.14;
}

.detail-cover {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 20px;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--secondary-200);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-meta span {
    padding: 6px 11px;
    color: var(--primary-800);
    font-size: 13px;
    font-weight: 800;
    background: var(--primary-50);
    border-radius: 999px;
}

.detail-copy .lead {
    color: var(--secondary-700);
    font-size: 17px;
    font-weight: 650;
}

.content-card {
    padding: 28px;
    margin-top: 26px;
    background: var(--white);
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--secondary-900);
    font-size: 24px;
    font-weight: 850;
}

.content-card p {
    margin: 0;
    color: var(--secondary-700);
    font-size: 16px;
}

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

.site-footer {
    margin-top: 64px;
    color: var(--secondary-300);
    background: var(--secondary-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 32px;
}

.footer-brand {
    color: var(--white);
}

.footer-about p {
    max-width: 560px;
    color: var(--secondary-300);
}

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

.footer-links h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 17px;
}

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

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--secondary-500);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: flex;
    }

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

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

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

@media (max-width: 760px) {
    .hero {
        min-height: 72vh;
    }

    .hero-content {
        bottom: 74px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 34px;
    }

    .section-head,
    .toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

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

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

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

@media (max-width: 520px) {
    .header-inner {
        width: min(100% - 24px, 1200px);
    }

    .brand {
        font-size: 19px;
    }

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

    .hero-actions {
        display: grid;
    }

    .page-title,
    .section,
    .page-section,
    .detail-shell,
    .footer-inner,
    .footer-bottom,
    .mobile-nav {
        width: min(100% - 24px, 1200px);
    }

    .content-card,
    .detail-copy {
        padding: 20px;
    }
}
