:root {
  --bg-deep: #0f172a;
  --bg-deeper: #020617;
  --bg-blue: #172554;
  --card: rgba(30, 41, 59, 0.56);
  --card-strong: rgba(15, 23, 42, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --gold: #facc15;
  --gold-dark: #ca8a04;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.22);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.13), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.25), transparent 30%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-blue) 48%, var(--bg-deep) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent 72%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.78));
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.26);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #fde68a);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(250, 204, 21, 0.25);
  transition: transform 0.5s ease;
}

.brand:hover .logo-mark {
  transform: rotate(180deg);
}

.logo-text {
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, var(--gold), #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: #dbeafe;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.78);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}

.mobile-panel {
  display: none;
  padding: 0 0 16px;
}

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

.mobile-panel a {
  display: block;
  margin: 6px 0;
  padding: 12px 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.48);
  border-radius: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.95s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide.is-active img {
  animation: heroZoom 8s ease forwards;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.84) 0%, rgba(2, 6, 23, 0.48) 45%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.25) 48%, rgba(2, 6, 23, 0.32) 100%);
}

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 58px 0 78px;
}

.hero-panel {
  max-width: 760px;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 12px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, var(--gold), #fef08a);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(250, 204, 21, 0.2);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.7;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  box-shadow: 0 14px 36px rgba(250, 204, 21, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.33);
}

.btn-ghost {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-ghost:hover {
  background: rgba(30, 64, 175, 0.55);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 30px;
  background: var(--gold);
}

.main-space {
  padding: 64px 0 80px;
}

.stack {
  display: grid;
  gap: 76px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.section-title::before {
  display: block;
  width: 8px;
  height: 32px;
  content: "";
  background: var(--gold);
  border-radius: 999px;
}

.section-desc {
  max-width: 740px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.feature-panel {
  padding: 28px;
  background: linear-gradient(100deg, rgba(30, 41, 59, 0.7), rgba(30, 64, 175, 0.28));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.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));
}

.movie-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  background: rgba(30, 41, 59, 0.76);
  border-color: rgba(250, 204, 21, 0.28);
  box-shadow: 0 24px 54px rgba(250, 204, 21, 0.12);
  transform: translateY(-8px);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.75);
}

.poster-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-cover::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  content: "▶";
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  transform: scale(0.58);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
  transform: scale(1);
}

.duration,
.rank-num,
.corner-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
}

.duration {
  top: 10px;
  right: 10px;
}

.rank-num {
  top: 10px;
  left: 10px;
  color: #111827;
  background: linear-gradient(90deg, var(--gold), #fef08a);
}

.corner-badge {
  bottom: 10px;
  left: 10px;
}

.card-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 24px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--gold);
}

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

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #64748b;
  font-size: 12px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  max-width: 58%;
  padding: 5px 8px;
  overflow: hidden;
  color: #93c5fd;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--blue-soft);
  border-radius: 999px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  border-color: rgba(250, 204, 21, 0.32);
  transform: translateY(-6px);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.category-card:hover img {
  opacity: 0.58;
  transform: scale(1.08);
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-content {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
}

.category-content h2,
.category-content h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.52);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-4px);
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
}

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

.rank-index {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fef08a);
  border-radius: 50%;
}

.rank-name {
  margin: 0 0 4px;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.page-card {
  padding: 28px;
  background: linear-gradient(100deg, rgba(30, 41, 59, 0.64), rgba(30, 64, 175, 0.22));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.page-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}

.page-card p {
  max-width: 860px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  margin: 26px 0;
}

.filter-bar input,
.filter-bar select,
.hero-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus,
.hero-search input:focus {
  border-color: rgba(250, 204, 21, 0.72);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

.filter-bar input::placeholder,
.hero-search input::placeholder {
  color: #64748b;
}

.hero-search {
  max-width: 540px;
  margin-top: 20px;
}

.no-result {
  display: none;
  padding: 36px;
  color: #cbd5e1;
  text-align: center;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

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

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

.player-box {
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.58));
  border: 0;
}

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

.play-circle {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  color: #111827;
  font-size: 38px;
  background: linear-gradient(135deg, var(--gold), #fef08a);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.32);
  transition: transform 0.2s ease;
}

.player-cover:hover .play-circle {
  transform: scale(1.06);
}

.player-error {
  display: none;
  padding: 16px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.25);
}

.player-error.is-visible {
  display: block;
}

.detail-card,
.side-card {
  padding: 24px;
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.18);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

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

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #cbd5e1;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

.detail-section {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.side-poster {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-2px);
}

.related-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.related-title {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-meta {
  color: #64748b;
  font-size: 12px;
}

.site-footer {
  padding: 42px 0;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.76);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 24px;
}

.footer-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-weight: 900;
}

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

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

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }

  to {
    transform: scale(1.09);
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 70px;
  }

  .hero-control {
    display: none;
  }

  .main-space {
    padding-top: 42px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .rank-index {
    display: none;
  }

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

  .related-item {
    grid-template-columns: 96px 1fr;
  }
}
