:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --text: #1f2937;
    --muted: #64748b;
    --card: #ffffff;
    --line: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--sky-600), var(--sky-700));
    box-shadow: 0 12px 30px rgba(3, 105, 161, 0.24);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand {
    color: #ffffff;
    font-size: 22px;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.nav-link,
.dropdown-trigger {
    border: 0;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    background: transparent;
}

.nav-link:hover,
.nav-link.active,
.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.16);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 10px;
    display: grid;
    gap: 4px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 9px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
}

.dropdown-menu a:hover {
    color: var(--sky-700);
    background: var(--sky-50);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
}

.top-search input,
.mobile-search input {
    border: 0;
    outline: 0;
    min-width: 210px;
    padding: 10px 14px;
    border-radius: 999px 0 0 999px;
    color: #0f172a;
}

.top-search button,
.mobile-search button {
    border: 0;
    padding: 10px 16px;
    border-radius: 0 999px 999px 0;
    color: #ffffff;
    font-weight: 800;
    background: #075985;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 0 24px 18px;
    background: var(--sky-600);
}

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

.mobile-link,
.mobile-cats a {
    display: block;
    padding: 11px 0;
    color: #ffffff;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    margin: 8px 0 16px;
}

.home-hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #082f49;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.04);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(14, 165, 233, 0.36), transparent 30%),
        linear-gradient(90deg, rgba(8, 47, 73, 0.94) 0%, rgba(8, 47, 73, 0.68) 44%, rgba(8, 47, 73, 0.12) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.62), transparent 44%);
}

.hero-inner {
    position: absolute;
    inset: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 42px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.04em;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.hero-copy strong {
    display: block;
    margin-top: 16px;
    font-size: clamp(24px, 3.2vw, 42px);
    color: #bae6fd;
}

.hero-copy p {
    max-width: 680px;
    margin: 20px 0 0;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.tag-row,
.detail-tags,
.card-meta,
.quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.quick-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.player-start,
.load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.load-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 32px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 132, 199, 0.86);
    font-weight: 900;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.hero-focus {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 24px;
    z-index: 5;
    width: min(430px, calc(100vw - 48px));
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(16px);
}

.focus-title {
    grid-column: 1 / -1;
    color: #e0f2fe;
    font-weight: 900;
}

.focus-item {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
}

.focus-item img {
    width: 100%;
    height: 82px;
    object-fit: cover;
}

.focus-item div {
    padding: 8px;
}

.focus-item span,
.focus-item strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.focus-item span {
    color: #bae6fd;
    font-size: 12px;
}

.main-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

.section-block {
    margin-bottom: 64px;
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--sky-700);
    font-weight: 950;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.section-head p,
.page-hero p,
.detail-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link,
.load-more {
    color: var(--sky-700);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--line), 0 12px 28px rgba(14, 165, 233, 0.12);
}

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

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

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

.movie-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 62%);
    opacity: 0;
    transition: 0.25s ease;
}

.movie-card-link:hover .card-cover::after {
    opacity: 1;
}

.play-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sky-500);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.38);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
}

.card-content {
    padding: 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.card-meta span {
    color: var(--sky-700);
    background: var(--sky-50);
    font-size: 12px;
    font-weight: 900;
    padding: 4px 9px;
    border-radius: 999px;
}

.card-content h3 {
    margin: 12px 0 8px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.32;
    font-weight: 950;
}

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

.tag-row {
    margin-top: auto;
}

.tag-row span,
.detail-tags span,
.quick-meta span {
    color: #475569;
    background: #f1f5f9;
}

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

.category-card {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 4px;
    height: 150px;
    background: var(--sky-100);
}

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

.category-body {
    padding: 20px;
}

.category-body span,
.page-eyebrow {
    color: var(--sky-700);
    font-weight: 950;
}

.category-body h3 {
    margin: 8px 0;
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
}

.category-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.page-hero {
    position: relative;
    overflow: hidden;
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 72px 24px;
    border-radius: 0 0 34px 34px;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0 24px;
    z-index: -1;
    border-radius: 34px;
    background:
        radial-gradient(circle at 90% 16%, rgba(14, 165, 233, 0.25), transparent 30%),
        linear-gradient(135deg, #ffffff, #e0f2fe);
    box-shadow: 0 20px 55px rgba(14, 165, 233, 0.14);
}

.library-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -18px 0 26px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.inline-search {
    display: flex;
    flex: 1;
}

.inline-search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px 0 0 999px;
    padding: 13px 16px;
    outline: none;
}

.inline-search button {
    border: 0;
    border-radius: 0 999px 999px 0;
    padding: 0 22px;
    color: #ffffff;
    font-weight: 900;
    background: var(--sky-600);
}

.search-count {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    font-weight: 950;
}

.rank-row img {
    width: 120px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    background: var(--sky-100);
}

.rank-row h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 950;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-action {
    padding: 10px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sky-600);
    font-weight: 900;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--sky-700);
}

.detail-top {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
}

.detail-poster {
    overflow: hidden;
    border-radius: 32px;
    background: var(--sky-100);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
}

.detail-title {
    padding: 34px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-title h1 {
    margin-bottom: 14px;
}

.quick-meta {
    margin: 22px 0;
}

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

.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px 64px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
}

.detail-section,
.side-panel,
.player-panel {
    padding: 26px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.player-panel {
    grid-column: 1 / -1;
    padding: 18px;
    background: #082f49;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16), rgba(2, 6, 23, 0.42));
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.38);
}

.player-start span::before {
    content: "▶";
    margin-left: 5px;
    font-size: 34px;
}

.player-start.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-message {
    margin-top: 12px;
    color: #bae6fd;
    font-weight: 800;
}

.detail-section h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 26px;
    font-weight: 950;
}

.detail-section p {
    margin: 0 0 16px;
    color: #334155;
    line-height: 1.95;
    font-size: 16px;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list span {
    color: var(--muted);
    font-weight: 900;
}

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

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

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

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

.footer-inner p {
    max-width: 620px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
}

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 24px;
    color: #94a3b8;
}

.no-results {
    display: none;
    padding: 26px;
    border-radius: 24px;
    color: var(--muted);
    background: #ffffff;
    font-weight: 900;
    text-align: center;
}

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

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

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

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

    .hero-poster,
    .hero-focus {
        display: none;
    }

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

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

    .detail-top,
    .detail-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        height: 64px;
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .home-hero {
        height: 580px;
    }

    .hero-inner {
        padding: 72px 18px 68px;
    }

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

    .main-shell,
    .detail-hero,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-head,
    .library-tools,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 52px 86px minmax(0, 1fr);
    }

    .rank-row img {
        width: 86px;
    }

    .rank-action {
        grid-column: 1 / -1;
        text-align: center;
    }

    .detail-title,
    .detail-section,
    .side-panel {
        padding: 22px;
    }
}
