:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-2: #172554;
  --card: rgba(30, 41, 59, 0.58);
  --card-solid: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --gold: #facc15;
  --gold-2: #d97706;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #172554 46%, #0f172a 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.14), transparent 28rem),
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.2), transparent 32rem),
    radial-gradient(circle at 50% 100%, rgba(2, 132, 199, 0.18), transparent 34rem);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 10px 38px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #d97706);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(250, 204, 21, 0.28);
  transition: transform 0.5s ease;
}

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

.brand-text {
  font-size: 1.24rem;
  background: linear-gradient(90deg, #facc15, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-link {
  padding: 10px 16px;
  color: #d1d5db;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.85);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.26);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.3);
  cursor: pointer;
}

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

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.58) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.24) 62%, rgba(2, 6, 23, 0.7) 100%);
}

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

.hero h1 {
  max-width: 860px;
  margin: 14px 0 16px;
  font-size: clamp(2.45rem, 7vw, 5rem);
  line-height: 1.02;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(1rem, 2.4vw, 1.32rem);
  line-height: 1.75;
}

.pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin-bottom: 10px;
}

.hero-actions,
.section-heading,
.category-overview-head,
.detail-meta,
.movie-meta,
.filter-panel,
.hero-dots {
  display: flex;
  align-items: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(90deg, #facc15, #d97706);
  box-shadow: 0 12px 34px rgba(250, 204, 21, 0.25);
}

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

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

.btn-ghost:hover,
.btn-soft:hover {
  background: rgba(37, 99, 235, 0.54);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  cursor: pointer;
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.78);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: all 0.25s ease;
}

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

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 28px;
  align-items: center;
  padding: 36px;
  margin-top: -32px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search h2,
.page-hero h1,
.section-heading h2,
.category-overview-head h2,
.detail-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.home-search p,
.page-hero p,
.category-overview-head p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: 0;
}

.quick-search input {
  min-width: 0;
  padding: 0 16px;
  border: 0;
  background: transparent;
}

.main-stack,
.page-main {
  padding-top: 56px;
}

.main-stack {
  display: grid;
  gap: 76px;
  padding-bottom: 76px;
}

.content-section {
  display: grid;
  gap: 24px;
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: #facc15;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(250, 204, 21, 0.26);
  box-shadow: 0 24px 60px rgba(250, 204, 21, 0.14);
}

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-thumb img,
.category-tile:hover img,
.rank-poster:hover img {
  transform: scale(1.08);
}

.movie-thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.movie-card:hover .movie-thumb::after {
  background: rgba(0, 0, 0, 0.38);
}

.duration,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  font-size: 0.78rem;
}

.rank-badge {
  right: auto;
  left: 10px;
  color: #111827;
  background: #facc15;
  font-weight: 900;
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #ffffff;
  background: rgba(250, 204, 21, 0.9);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: all 0.28s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-title:hover,
.movie-card:hover .movie-title {
  color: #facc15;
}

.movie-info p,
.rank-detail p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 8px 0 12px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.detail-meta {
  gap: 10px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 0.82rem;
}

.movie-meta a,
.detail-meta a {
  color: #60a5fa;
}

.category-section,
.ranking-section,
.category-overview-card,
.detail-card,
.side-card,
.player-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.category-section,
.ranking-section,
.category-overview-card {
  padding: 28px;
}

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

.category-tile {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 174px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.16));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  right: 16px;
  left: 16px;
  z-index: 2;
}

.category-tile strong {
  bottom: 48px;
  font-size: 1.18rem;
}

.category-tile em {
  bottom: 18px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-card-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: stretch;
}

.movie-thumb-row {
  height: 100%;
  min-height: 112px;
  aspect-ratio: auto;
}

.page-main {
  padding-bottom: 76px;
}

.page-hero {
  padding: 42px 0 22px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  color: #94a3b8;
  font-size: 0.92rem;
}

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

.filter-panel {
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  margin: 18px 0 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.filter-search {
  flex: 1 1 320px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
}

.filter-panel select {
  flex: 0 0 168px;
}

.category-overview-card {
  margin-bottom: 26px;
}

.category-overview-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.rank-table {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 68px 136px minmax(0, 1fr) 72px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 136px;
  height: 78px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.rank-score {
  color: #facc15;
  font-size: 1.45rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
  gap: 28px;
}

.detail-primary,
.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  background: #000000;
}

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

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-start {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  color: #111827;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 18px 58px rgba(250, 204, 21, 0.38);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

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

.player-start span {
  margin-left: 5px;
  font-size: 2rem;
}

.detail-card,
.side-card {
  padding: 24px;
}

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

.detail-card h2,
.side-card h2 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
}

.detail-card p {
  color: #cbd5e1;
  line-height: 1.85;
}

.one-line {
  color: #e2e8f0;
  font-size: 1.08rem;
}

.tag-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag-list span {
  padding: 7px 11px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 999px;
  font-size: 0.84rem;
}

.poster-card {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.poster-card strong {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #111827;
  background: #facc15;
  border-radius: 999px;
  font-size: 1.4rem;
}

.site-footer {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
  padding: 46px 0;
  color: #cbd5e1;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
}

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

.site-footer p {
  color: #94a3b8;
  line-height: 1.75;
}

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.is-filtered-out {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 24px;
  color: #94a3b8;
  text-align: center;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

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

  .detail-layout,
  .home-search,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero {
    height: 520px;
  }

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

  .hero-control {
    display: none;
  }

  .home-search {
    padding: 24px;
  }

  .quick-search {
    flex-direction: column;
    border-radius: 18px;
  }

  .quick-search input {
    min-height: 44px;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-info {
    padding: 13px;
  }

  .movie-card-row {
    grid-template-columns: 116px minmax(0, 1fr);
  }

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

  .rank-score {
    display: none;
  }

  .rank-poster img {
    width: 94px;
    height: 64px;
  }

  .filter-panel select,
  .filter-panel .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

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

  .category-section,
  .ranking-section,
  .category-overview-card,
  .detail-card,
  .side-card {
    padding: 18px;
  }

  .movie-card-row {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}
