:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #0891b2;
    --deep: #0f172a;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

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

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.logo-title {
    display: block;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-subtitle {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--blue);
    background: #eff6ff;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--blue);
    align-items: center;
    justify-content: center;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
}

.mobile-nav a:hover {
    color: var(--blue);
    background: #eff6ff;
}

.page-main {
    min-height: 70vh;
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.5), transparent 38%), linear-gradient(135deg, #1d4ed8, #06b6d4);
    color: #fff;
}

.hero:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.06));
    pointer-events: none;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.7s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide-inner {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 560px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 44px;
    padding: 52px 0;
}

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

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #dffafe;
    font-size: 18px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--blue);
    background: #fff;
    box-shadow: 0 18px 40px rgba(255, 255, 255, 0.2);
}

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

.btn-blue {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero-tags span,
.tag-pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ecfeff;
    font-size: 13px;
    font-weight: 700;
}

.hero-poster-wrap {
    position: relative;
    border-radius: 32px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(18px);
}

.hero-poster {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(6, 182, 212, 0.35));
}

.hero-poster-card {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.hero-poster-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.hero-poster-card span {
    color: #cbd5e1;
    font-size: 13px;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

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

.section {
    padding: 60px 0;
}

.section.compact {
    padding-top: 34px;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-title:before {
    content: "";
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
}

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

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

.category-tile {
    position: relative;
    display: block;
    min-height: 164px;
    padding: 22px;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 24px 55px rgba(37, 99, 235, 0.26);
}

.category-tile:after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -32px;
    bottom: -32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.category-tile h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 950;
}

.category-tile p {
    position: relative;
    margin: 0;
    color: #e0f2fe;
    font-size: 13px;
}

.category-tile.blue {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.category-tile.cyan {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.category-tile.purple {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-tile.indigo {
    background: linear-gradient(135deg, #4338ca, #0f172a);
}

.category-tile.sky {
    background: linear-gradient(135deg, #0284c7, #22d3ee);
}

.category-tile.amber {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.category-tile.rose {
    background: linear-gradient(135deg, #e11d48, #7c3aed);
}

.category-tile.slate {
    background: linear-gradient(135deg, #334155, #0f172a);
}

.category-tile.teal {
    background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-tile.emerald {
    background: linear-gradient(135deg, #059669, #10b981);
}

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

.poster-box {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card a:hover .poster-box img {
    transform: scale(1.06);
}

.poster-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 40px 10px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(37, 99, 235, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.badge.light {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

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

.movie-card h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    padding: 18px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.page-hero {
    padding: 76px 0 52px;
    color: #fff;
    background: radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.56), transparent 36%), linear-gradient(135deg, #1d4ed8, #0891b2);
}

.page-hero h1 {
    margin: 14px 0 12px;
    max-width: 900px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 700;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.rank-number {
    position: absolute;
    left: 6px;
    top: 6px;
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}

.rank-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.35;
}

.rank-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.watch-panel,
.detail-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.watch-panel {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: saturate(1.05);
}

.play-cover:after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1), rgba(2, 6, 23, 0.82));
}

.play-button {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
    font-size: 32px;
    transition: transform 0.2s ease;
}

.play-cover:hover .play-button {
    transform: scale(1.08);
}

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

.watch-info {
    padding: 22px;
}

.watch-info h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.info-chips span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
}

.detail-panel {
    padding: 24px;
    margin-top: 24px;
}

.detail-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #334155;
}

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

.tag-list a,
.tag-list span {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.side-panel {
    padding: 18px;
    position: sticky;
    top: 96px;
}

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

.side-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.side-card:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.side-card img {
    width: 68px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.side-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.no-results {
    display: none;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 950;
}

.site-footer p,
.site-footer a {
    color: #94a3b8;
    font-size: 14px;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 13px;
}

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

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

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

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

    .side-panel {
        position: static;
    }
}

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

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

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

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

    .hero-slide-inner {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
        padding: 38px 0 72px;
    }

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

    .section-header {
        display: block;
    }

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

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

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

    .logo-title {
        font-size: 18px;
    }

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

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

    .rank-item {
        grid-template-columns: 74px 1fr;
    }

    .section {
        padding: 42px 0;
    }

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

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

    .play-button {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }

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