:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eff6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #06b6d4;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", 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.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

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

.brand-name {
    font-size: 21px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-links a,
.mobile-panel a {
    padding: 10px 13px;
    border-radius: 12px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover {
    color: var(--primary);
    background: var(--surface-soft);
    transform: translateY(-1px);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-panel input,
.filter-panel input {
    width: 260px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    padding: 11px 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-panel input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.primary-button,
.secondary-button,
.filter-buttons button {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.header-search button {
    padding: 11px 16px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
}

.secondary-button {
    color: var(--primary);
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 11px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--primary);
}

.mobile-panel {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-panel form,
.mobile-panel input {
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.35), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.42), transparent 35%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 46%, #0891b2 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -42% -10%;
    height: 360px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(80px);
    border-radius: 50%;
}

.hero-slider {
    position: relative;
    max-width: 1240px;
    min-height: 620px;
    margin: 0 auto;
    padding: 78px 20px 68px;
}

.hero-slide {
    position: relative;
    z-index: 1;
    display: none;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 430px);
    gap: 48px;
    align-items: center;
}

.hero-slide.active {
    display: grid;
    animation: fadeLift 0.5s ease both;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #bfdbfe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.section-kicker {
    color: var(--primary);
    background: var(--surface-soft);
    border-color: rgba(37, 99, 235, 0.12);
}

.hero h1,
.hero h2 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.hero-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
    position: relative;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 8% -10% -8% 10%;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.55), rgba(6, 182, 212, 0.45));
    filter: blur(24px);
}

.hero-poster img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
}

.hero-float {
    position: absolute;
    z-index: 2;
    right: -18px;
    bottom: 30px;
    width: min(280px, 88%);
    padding: 18px;
    border-radius: 22px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-float strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.hero-float span {
    color: var(--muted);
    font-size: 14px;
}

.hero-controls {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.hero-controls button,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-dot {
    width: 38px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

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

.page-main,
.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px;
}

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

.page-heading {
    align-items: flex-start;
}

.section-heading h2,
.page-heading h1,
.detail-copy h1 {
    margin: 10px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
    max-width: 720px;
    color: var(--muted);
    margin: 10px 0 0;
}

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

.movie-card {
    min-width: 0;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
}

.poster-score {
    right: 12px;
    color: #0f172a;
    background: #facc15;
}

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

.movie-card h3,
.rank-card h3,
.related-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card p,
.rank-card p,
.related-card p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
    color: #475569;
    font-size: 13px;
}

.movie-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--primary-dark);
    background: var(--surface-soft);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    border-radius: 26px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.category-card-main {
    display: block;
    min-height: 190px;
    padding: 26px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.22), transparent 26%),
        linear-gradient(135deg, var(--primary), var(--accent));
}

.category-card-main span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 800;
}

.category-card-main h2 {
    margin: 28px 0 8px;
    font-size: 28px;
}

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

.category-sample {
    display: grid;
    gap: 8px;
    padding: 16px 18px 18px;
}

.category-sample a {
    color: #475569;
    font-weight: 700;
}

.category-sample a:hover {
    color: var(--primary);
}

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

.rank-card {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-card img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

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

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

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

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    padding: 10px 14px;
    color: #475569;
    background: #f1f5f9;
}

.filter-buttons button.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.detail-hero {
    padding: 34px 20px 54px;
    background:
        radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.22), transparent 30%),
        linear-gradient(135deg, #020617, #1e3a8a 58%, #075985);
}

.detail-wrap {
    max-width: 1240px;
    margin: 0 auto;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.62), rgba(30, 64, 175, 0.38));
}

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

.play-cover-inner {
    display: grid;
    justify-items: center;
    gap: 14px;
    color: #ffffff;
    text-align: center;
}

.play-button {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    font-size: 30px;
}

.detail-copy {
    margin-top: 24px;
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-copy h1 {
    margin-top: 0;
}

.detail-copy p {
    color: #334155;
}

.detail-copy h2 {
    margin: 24px 0 10px;
    font-size: 24px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 18px;
    border-radius: 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.side-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 16px;
}

.side-card dl {
    display: grid;
    gap: 9px;
    margin: 0;
}

.side-card div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 8px;
}

.side-card dt {
    color: #bfdbfe;
}

.side-card dd {
    margin: 0;
    text-align: right;
    font-weight: 800;
}

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

.related-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.related-card div {
    padding: 12px;
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
}

.no-results.show {
    display: block;
}

.site-footer {
    margin-top: 36px;
    padding: 42px 20px 26px;
    color: #cbd5e1;
    background: #0f172a;
}

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

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

.footer-inner p {
    max-width: 620px;
    margin: 10px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: flex-start;
}

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

.copyright {
    max-width: 1240px;
    margin: 28px auto 0;
    color: #94a3b8;
    font-size: 14px;
}

@keyframes fadeLift {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-poster {
        max-width: 420px;
        margin: 0 auto;
    }

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

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

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

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
    }

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

    .hero-slider {
        min-height: auto;
        padding: 52px 18px;
    }

    .hero h1,
    .hero h2 {
        font-size: 40px;
    }

    .hero-float {
        right: 12px;
        left: 12px;
        width: auto;
    }

    .section,
    .page-main {
        padding: 36px 16px;
    }

    .section-heading,
    .page-heading,
    .footer-inner {
        display: block;
    }

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

    .rank-card a {
        grid-template-columns: auto 82px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-card img {
        width: 82px;
    }

    .detail-hero {
        padding: 24px 14px 36px;
    }

    .detail-copy {
        padding: 18px;
    }
}
