:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --blue: #2563eb;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --slate: #020617;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #0369a1;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 16% 10%, rgba(56, 189, 248, 0.25), transparent 30%), linear-gradient(135deg, #020617 0%, #0f2f69 58%, #075985 100%);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, rgba(248, 250, 252, 1) 0%, rgba(248, 250, 252, 0) 28%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  min-height: 600px;
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 74px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  color: transparent;
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #99f6e4);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-3px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: absolute;
  right: max(20px, calc((100vw - 1280px) / 2));
  top: 50%;
  z-index: 2;
  width: min(360px, 28vw);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  transform: translateY(-50%) rotate(2deg);
}

.hero-poster img,
.card-cover img,
.rank-cover img,
.detail-cover img,
.category-preview img,
.watch-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  width: min(720px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input,
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: #ffffff;
}

.hero-search input {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
}

.hero-search button {
  min-width: 110px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.content-section,
.page-main,
.movie-detail {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 74px 0;
}

.blue-panel {
  width: 100%;
  max-width: none;
  padding: 74px max(16px, calc((100vw - 1280px) / 2));
  border-radius: 0;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.78), rgba(207, 250, 254, 0.82));
}

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

.section-head h2,
.ranking-panel h2,
.watch-section h2,
.detail-text h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-link,
.text-button {
  color: var(--blue);
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

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

.movie-card:not(.wide-card) .card-cover {
  aspect-ratio: 3 / 4;
}

.card-cover img {
  transition: transform 0.45s ease;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.74);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #0f172a;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
}

.card-title:hover,
.rank-info a:hover,
.breadcrumb a:hover {
  color: var(--blue);
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 12px;
  overflow: hidden;
  color: #64748b;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 22px;
  scroll-snap-type: x mandatory;
}

.wide-card {
  scroll-snap-align: start;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
}

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

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

.category-tile,
.category-card,
.ranking-panel,
.page-hero,
.detail-hero,
.watch-section,
.detail-text {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.category-tile {
  display: block;
  padding: 24px;
  transition: 0.24s ease;
}

.category-tile:hover,
.category-card:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-tile span,
.category-info p {
  color: #64748b;
  line-height: 1.7;
}

.ranking-panel {
  align-self: start;
  padding: 24px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: auto 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: #ffffff;
  transition: 0.24s ease;
}

.rank-number {
  min-width: 34px;
  color: #0ea5e9;
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  width: 76px;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: #dbeafe;
}

.rank-info a {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-weight: 900;
}

.rank-info p {
  display: -webkit-box;
  margin: 6px 0;
  overflow: hidden;
  color: #64748b;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.5;
}

.rank-info span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.page-main {
  padding: 36px 0 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 54px;
  color: #ffffff;
  background: radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.28), transparent 34%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.slim-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  overflow: hidden;
  padding: 18px;
  transition: 0.24s ease;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-preview a {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #dbeafe;
}

.category-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-info h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.sticky-toolbar {
  position: sticky;
  top: 86px;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.search-box span {
  color: #0369a1;
  font-weight: 900;
}

.search-box input {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
}

.search-box.large input {
  min-height: 48px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  color: #0369a1;
  background: #eff6ff;
  font-weight: 900;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.empty-message {
  display: none;
  margin: 30px 0;
  padding: 24px;
  border-radius: 18px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.empty-message.show {
  display: block;
}

.movie-detail {
  padding: 34px 0 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: #dbeafe;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info .eyebrow,
.page-hero .eyebrow {
  border-color: rgba(255, 255, 255, 0.26);
}

.detail-info .eyebrow {
  color: #0369a1;
  background: #e0f2fe;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.lead {
  margin: 20px 0 24px;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.meta-list div {
  padding: 13px 14px;
  border-radius: 16px;
  background: #f1f5f9;
}

.meta-list dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.meta-list dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.large-tags span {
  min-height: 32px;
}

.watch-section {
  margin-top: 30px;
  padding: 28px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.2);
}

.watch-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
  background: #020617;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
}

.player-cover img {
  position: absolute;
  inset: 0;
  opacity: 0.66;
}

.player-button {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 108px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 58px rgba(37, 99, 235, 0.35);
  font-size: 22px;
  font-weight: 900;
}

.watch-player.is-playing .player-cover {
  display: none;
}

.detail-text {
  margin-top: 30px;
  padding: 34px;
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

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

.prev-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.prev-next a {
  flex: 1 1 260px;
  padding: 16px 18px;
  border-radius: 18px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-logo {
  color: #ffffff;
  margin-bottom: 16px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

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

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

  .hero-poster {
    display: none;
  }

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

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

  .menu-button {
    display: block;
  }

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

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding: 60px 0 170px;
  }

  .hero h1 {
    font-size: 38px;
    letter-spacing: -0.04em;
  }

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

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .hero-search button {
    min-height: 46px;
  }

  .content-section {
    padding: 48px 0;
  }

  .section-head {
    display: grid;
  }

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

  .category-card {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .watch-section,
  .detail-text {
    padding: 24px;
    border-radius: 20px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 340px;
  }

  .player-button {
    width: 82px;
    height: 82px;
    font-size: 18px;
  }
}
