:root {
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --surface: #ffffff;
  --surface-dark: #0f172a;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --orange: #f97316;
  --blue: #2563eb;
  --green: #16a34a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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.96);
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.35);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 650;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fbbf24;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.14);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #e2e8f0;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero {
  width: 100%;
  margin: 0 auto 34px;
  height: min(70vh, 720px);
  min-height: 520px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 54px;
  padding: 76px min(64px, 5vw);
}

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

.hero-content {
  color: #fff;
  max-width: 720px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.hero p {
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.9;
  max-width: 650px;
}

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

.primary-button,
.ghost-button,
.section-more,
.rank-watch,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  min-height: 44px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
  border: 0;
}

.primary-button:hover,
.home-search button:hover,
.rank-watch:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
}

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

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

.hero-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-controls {
  position: absolute;
  left: min(64px, 5vw);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #fbbf24;
}

.quick-search,
.filter-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-content article,
.content-section,
.site-footer,
.overview-card a {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
}

.quick-search {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-bottom: 42px;
}

.quick-search span,
.section-kicker,
.page-hero span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-search h2,
.section-heading h2,
.page-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.home-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 16px;
  outline: none;
}

.content-section {
  padding: 30px;
  margin: 0 0 42px;
}

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

.section-more {
  color: #fff;
  background: #0f172a;
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.section-more:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

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

.movie-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  border-color: rgba(245, 158, 11, 0.42);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: #cbd5e1;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #111827;
  background: #fbbf24;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--orange);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  min-height: 42px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  margin-top: 13px;
}

.card-meta span,
.rank-meta span {
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 9px;
}

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

.category-tile,
.overview-card a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 155px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:after,
.overview-card a:after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -28px;
  bottom: -38px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
}

.category-tile:hover,
.overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
}

.category-tile span,
.overview-card span {
  color: #fbbf24;
  font-weight: 900;
  font-size: 13px;
}

.category-tile strong,
.overview-card h2 {
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
}

.category-tile em,
.overview-card p {
  color: #cbd5e1;
  font-style: normal;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.compact-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card span {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-main,
.detail-main {
  padding: 34px 0 52px;
}

.page-hero {
  padding: 34px;
  margin-bottom: 26px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.page-hero.slim p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 760px;
}

.filter-panel {
  padding: 20px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.search-field span {
  color: #334155;
}

.search-field input,
.filter-selects select {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  min-height: 46px;
  padding: 0 14px;
  outline: none;
}

.search-field input:focus,
.filter-selects select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 96px 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-poster img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-number {
  font-size: 28px;
  font-weight: 950;
  color: #f59e0b;
  text-align: center;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.rank-watch {
  background: #0f172a;
  color: #fff;
  min-height: 38px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 20px;
}

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

.detail-hero {
  padding: 28px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin: 18px 0 16px;
}

.detail-line {
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.85;
  margin: 0 0 22px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.detail-meta div {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 12px;
}

.detail-meta dt {
  color: #cbd5e1;
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-meta dd {
  margin: 0;
  font-weight: 850;
}

.player-section {
  padding: 26px;
  margin-bottom: 28px;
}

.player-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.player-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  z-index: 1;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 48px rgba(249, 115, 22, 0.35);
}

.player-cover strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 34px;
}

.detail-content article {
  padding: 26px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #475569;
  line-height: 1.95;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 34px;
  color: #cbd5e1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 34px;
}

.footer-about p {
  line-height: 1.8;
  margin: 16px 0 0;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 34px;
  color: #94a3b8;
  font-size: 13px;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 56px 28px 70px;
  }

  .hero-poster {
    display: none;
  }

  .quick-search,
  .filter-panel,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner,
  main,
  .page-main,
  .detail-main,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
    border-radius: 0 0 24px 24px;
  }

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

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

  .hero-controls {
    left: 28px;
  }

  .home-search,
  .filter-selects,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

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

  .content-section,
  .quick-search,
  .page-hero,
  .filter-panel,
  .player-section,
  .detail-content article {
    padding: 20px;
  }

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

  .rank-number {
    position: absolute;
    opacity: 0.14;
    right: 22px;
    font-size: 52px;
  }

  .rank-watch {
    grid-column: 1 / -1;
  }

  .rank-poster img {
    width: 76px;
    height: 86px;
  }

  .detail-hero {
    padding: 20px;
  }
}
