:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(30, 41, 59, 0.76);
  --panel-solid: #1e293b;
  --panel-deep: #0b1120;
  --line: rgba(148, 163, 184, 0.16);
  --text: #ffffff;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --amber: #f59e0b;
  --amber-2: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 35%),
    radial-gradient(circle at 84% 8%, rgba(249, 115, 22, 0.13), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #0b1120 52%, #0f172a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.logo-text {
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-weight: 600;
}

.nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.mobile-nav a:hover,
.nav a.active {
  color: #fbbf24;
}

.header-search {
  width: min(100%, 320px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.52);
}

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

.header-search input::placeholder,
.filter-input::placeholder {
  color: #94a3b8;
}

.search-button,
.menu-button,
.slider-button,
.play-inline,
.clear-button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.search-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.72);
}

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

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.55);
}

.hero {
  position: relative;
  height: min(76vh, 640px);
  min-height: 500px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(249, 115, 22, 0.12)),
    #1e293b;
}

.image-missing {
  opacity: 0.2;
  filter: blur(1px);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.08) 45%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  right: 8%;
  top: 18%;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  filter: blur(90px);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding: 64px 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.badge.hot,
.rank-number {
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 0.92rem;
}

.hero-meta {
  margin-top: 18px;
}

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

.primary-button,
.secondary-button,
.category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.secondary-button {
  color: white;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.primary-button:hover,
.secondary-button:hover,
.category-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

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

.hero-dot {
  width: 28px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  padding: 58px 0;
}

.section.alt {
  background: rgba(30, 41, 59, 0.28);
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
  margin: 8px 0 0;
  color: var(--dim);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(249, 115, 22, 0.1)),
    #334155;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

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

.play-float {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
}

.play-circle {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.32);
}

.year-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.card-body {
  flex: 1;
  padding: 15px;
}

.card-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #fbbf24;
}

.card-body p {
  margin: 8px 0 12px;
  color: var(--dim);
  font-size: 0.9rem;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

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

.tag,
.card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(51, 65, 85, 0.82);
  font-size: 0.78rem;
}

.scroller-wrap {
  position: relative;
}

.scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
  display: none;
}

.scroller .movie-card {
  flex: 0 0 245px;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.slider-button,
.clear-button {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(51, 65, 85, 0.85);
}

.category-card {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.38);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: var(--dim);
  font-size: 0.92rem;
}

.category-count {
  display: inline-flex;
  width: max-content;
  margin-top: 20px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.26);
  font-weight: 800;
}

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

.page-title {
  max-width: 850px;
}

.breadcrumb {
  margin-bottom: 14px;
  color: var(--dim);
  font-size: 0.92rem;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 24px 0 30px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.58);
}

.filter-input,
.filter-select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.filter-select option {
  color: #0f172a;
}

.clear-button {
  width: auto;
  min-width: 84px;
  padding: 0 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.62);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.34);
}

.rank-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
}

.rank-row img {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: #334155;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.9fr 0.9fr;
  gap: 28px;
  align-items: start;
  padding-top: 30px;
}

.player-card,
.info-card,
.text-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.68);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 38%),
    #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
}

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

.big-play {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  box-shadow: 0 22px 46px rgba(249, 115, 22, 0.36);
}

.player-meta {
  padding: 16px 18px;
  color: var(--dim);
  border-top: 1px solid var(--line);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  background: #334155;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-card-body,
.text-card {
  padding: 20px;
}

.detail-title h1 {
  margin-top: 0;
}

.detail-meta {
  margin: 14px 0 16px;
}

.detail-one-line {
  color: var(--muted);
  font-size: 1.06rem;
}

.text-card {
  margin-top: 22px;
}

.text-card h2,
.info-card h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.text-card p {
  margin: 0;
  color: var(--muted);
}

.timeline-list {
  display: grid;
  gap: 22px;
}

.year-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.year-badge {
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
}

.year-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.5), transparent);
}

.footer {
  margin-top: 70px;
  padding: 44px 0 28px;
  color: var(--dim);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 26px;
}

.footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 0.96rem;
}

.footer p,
.footer a {
  color: var(--dim);
  font-size: 0.92rem;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.empty-state {
  display: none;
  padding: 38px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--radius);
  color: var(--dim);
  text-align: center;
}

.empty-state.show {
  display: block;
}

@media (max-width: 1180px) {
  .grid.cards,
  .grid.categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .nav,
  .header-inner > .header-search {
    display: none;
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

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

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

  .filter-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .header-inner {
    min-height: 66px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .hero-copy {
    padding: 54px 0 84px;
  }

  .hero-actions {
    display: grid;
  }

  .grid.cards,
  .grid.categories,
  .grid.rank-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 0.96rem;
  }

  .card-body p {
    font-size: 0.84rem;
  }

  .rank-row {
    grid-template-columns: 42px 86px 1fr;
    gap: 10px;
  }

  .rank-row img {
    width: 86px;
    height: 58px;
  }

  .big-play {
    width: 72px;
    height: 72px;
  }
}
