:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --orange: #f97316;
  --green: #22c55e;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

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

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

.brand {
  font-size: 25px;
}

.footer-brand {
  font-size: 22px;
  margin-bottom: 14px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: white;
  font-size: 15px;
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.45);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #cbd5e1;
}

.desktop-nav > a,
.nav-group > a,
.nav-group > button {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav .is-active {
  color: var(--cyan);
}

.nav-group {
  position: relative;
  padding: 24px 0;
}

.nav-menu {
  position: absolute;
  top: 66px;
  left: -18px;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}

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

.nav-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: rgba(15, 23, 42, 0.72);
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #cbd5e1;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  color: var(--cyan);
}

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

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-grid a {
  position: relative;
  overflow: hidden;
}

.hero-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.02);
}

.hero-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.82));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.86) 38%, rgba(15, 23, 42, 0.28) 74%, rgba(15, 23, 42, 0.08) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 180px;
  background: linear-gradient(0deg, #0f172a, rgba(15, 23, 42, 0));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 38px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  font-size: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: white;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.64);
  border-color: rgba(148, 163, 184, 0.26);
}

.hero-search {
  display: flex;
  max-width: 520px;
  padding: 7px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.hero-search input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 13px;
  padding: 10px 16px;
  cursor: pointer;
  color: white;
  background: var(--cyan-deep);
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateX(-4px);
  border-color: rgba(34, 211, 238, 0.6);
}

.hero-mini-card img {
  width: 128px;
  height: 82px;
  object-fit: cover;
  border-radius: 13px;
}

.hero-mini-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.hero-mini-card p {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-mini-meta {
  display: flex;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
}

.section {
  margin: 72px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

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

.more-link {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.35);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #020617;
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 9px;
  padding: 5px 8px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.card-badge-right {
  right: 12px;
  background: rgba(2, 6, 23, 0.62);
}

.card-badge-left {
  left: 12px;
  background: rgba(249, 115, 22, 0.9);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  top: auto;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
}

.hover-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.55);
  transition: all 0.22s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--cyan);
}

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

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

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 20px;
  background: radial-gradient(circle at 18% 16%, rgba(34, 211, 238, 0.22), rgba(30, 41, 59, 0.96) 42%, rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.56);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 64px 0 32px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin: 24px 0 32px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.search-box span {
  color: var(--cyan);
  font-size: 22px;
}

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

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

.select-row select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: #1e293b;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 28px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.88fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 70px;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: var(--shadow);
}

.player-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.32) 34%, rgba(2, 6, 23, 0.66));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.58);
  font-size: 34px;
  padding-left: 6px;
}

.detail-card {
  padding: 26px;
  margin-bottom: 24px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-strong);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 13px;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 9px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(15, 23, 42, 0.62);
}

.related-item img {
  width: 116px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item:hover h3 {
  color: var(--cyan);
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 178px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.rank-num {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 900;
}

.rank-row img {
  width: 178px;
  height: 98px;
  object-fit: cover;
  border-radius: 15px;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

.rank-action {
  color: var(--cyan);
  font-weight: 800;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.96);
}

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

.footer-grid p {
  max-width: 420px;
  color: var(--muted);
}

.footer-grid h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .hero-panel {
    display: none;
  }

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

  .rank-action {
    grid-column: 3;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .brand {
    font-size: 21px;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

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

  .hero-grid a:nth-child(n+2) {
    display: none;
  }

  .hero-inner {
    padding: 70px 0 54px;
  }

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

  .hero-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search input {
    min-height: 42px;
  }

  .section-head {
    display: block;
  }

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

  .select-row {
    grid-template-columns: 1fr 1fr;
  }

  .detail-card {
    padding: 20px;
  }

  .side-card {
    position: static;
  }

  .rank-row {
    grid-template-columns: 42px 104px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-row img {
    width: 104px;
    height: 70px;
  }

  .rank-row h2 {
    font-size: 17px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .select-row {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .related-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .related-item img {
    width: 96px;
    height: 66px;
  }
}
