:root {
  --bg: #0a0e1a;
  --bg-soft: #101827;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 28rem),
    var(--bg);
  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;
}

button {
  cursor: pointer;
}

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

.glass {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.42);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
}

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 20px 0;
}

.desktop-nav a:hover,
.nav-dropdown button:hover,
.desktop-nav .active {
  color: var(--amber);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border-radius: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
}

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

.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: 10px;
}

.nav-dropdown-menu a:hover {
  background: var(--panel-strong);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  border-radius: 16px;
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: var(--panel-strong);
  color: var(--amber);
}

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

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.88) 0%, rgba(10, 14, 26, 0.52) 48%, rgba(10, 14, 26, 0.24) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 84px;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.46);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.24);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.45);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.section-block {
  padding: 58px 0;
}

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

.section-title-row.compact {
  margin-bottom: 18px;
}

.section-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-title-row a {
  color: var(--amber);
  font-weight: 700;
}

.section-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
}

.search-panel input,
.search-panel select,
.clear-filter {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
}

.search-panel option {
  background: var(--bg-soft);
}

.clear-filter {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.movie-card a {
  display: grid;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(249, 115, 22, 0.05));
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.movie-info {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.movie-info h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.25);
}

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

.movie-card.wide a {
  grid-template-columns: 170px 1fr;
}

.movie-card.wide .movie-cover {
  aspect-ratio: auto;
  min-height: 230px;
}

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

.category-entry,
.category-summary {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 18px;
  border-radius: var(--radius);
}

.category-entry img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.92), rgba(10, 14, 26, 0.35));
}

.category-entry div,
.category-summary a {
  position: relative;
  z-index: 2;
}

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

.category-entry p,
.category-summary p,
.category-samples {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-summary a {
  display: grid;
  gap: 12px;
  height: 100%;
}

.category-summary span {
  color: var(--amber);
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
}

.rank-list,
.mini-card-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 58px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 8px 14px 8px 8px;
  border-radius: 16px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(255, 255, 255, 0.09);
}

.rank-row img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.rank-num {
  color: var(--amber);
  font-weight: 900;
  font-size: 20px;
  text-align: center;
}

.rank-title {
  font-weight: 700;
}

.rank-meta {
  color: var(--soft);
  font-size: 13px;
}

.movie-card.mini a {
  grid-template-columns: 96px 1fr;
}

.movie-card.mini .movie-cover {
  aspect-ratio: 2 / 3;
}

.movie-card.mini .movie-info h3 {
  font-size: 16px;
}

.page-main {
  padding: 42px 0 74px;
}

.page-hero {
  margin-bottom: 28px;
  padding: clamp(24px, 5vw, 46px);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 45%),
    rgba(255, 255, 255, 0.06);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

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

.category-grid,
.rank-grid {
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  padding: 24px;
  border-radius: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(249, 115, 22, 0.05));
  box-shadow: var(--shadow);
}

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

.detail-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--soft);
}

.detail-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.player-section,
.detail-content {
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.player-box {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #05070d;
}

.player-box video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #05070d;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: rgba(10, 14, 26, 0.32);
  color: #fff;
  overflow: hidden;
}

.player-start img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(10, 14, 26, 0.78) 70%);
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 48px rgba(249, 115, 22, 0.38);
  font-size: 30px;
}

.play-text {
  font-size: 18px;
  font-weight: 800;
}

.detail-content {
  color: var(--muted);
}

.detail-content p {
  margin: 0 0 20px;
  font-size: 17px;
}

.related-block {
  padding-bottom: 0;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 110px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
}

.footer-inner p {
  margin: 6px 0 0;
}

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

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

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

.slim-actions {
  margin-top: 20px;
}

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

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

  .two-column,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 580px;
  }

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

  .hero-arrow {
    display: none;
  }

  .section-title-row,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-card.wide a,
  .movie-card.mini a {
    grid-template-columns: 1fr;
  }

  .movie-card.wide .movie-cover,
  .movie-card.mini .movie-cover {
    aspect-ratio: 2 / 3;
    min-height: 0;
  }

  .rank-row {
    grid-template-columns: 42px 54px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .detail-hero,
  .player-section,
  .detail-content {
    padding: 16px;
  }
}

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

  .brand {
    font-size: 18px;
  }

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

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

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

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

  .detail-copy h1 {
    font-size: 34px;
  }
}
