:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --panel-deep: #0b1120;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34%), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  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 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.25s ease;
}

.brand:hover,
.footer-brand:hover {
  transform: translateY(-1px) scale(1.02);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #facc15);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 3px;
  color: #fde68a;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: 250px;
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  height: 42px;
  padding: 0 44px 0 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.mobile-link {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.75);
}

.mobile-link.active,
.mobile-link:hover {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-search input {
  height: 42px;
  padding: 0 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--amber);
  color: #111827;
  font-weight: 800;
}

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

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

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

.hero-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.14) 100%), linear-gradient(180deg, rgba(2, 6, 23, 0.18) 0%, rgba(2, 6, 23, 0.95) 100%);
}

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

.hero-copy {
  width: min(680px, 100%);
  padding-top: 26px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy p {
  margin: 0;
  max-width: 650px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #fde68a;
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  min-width: 136px;
  padding: 14px 24px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, var(--amber));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  min-width: 136px;
  padding: 13px 24px;
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.3);
  background: rgba(15, 23, 42, 0.52);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-button:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.content-section {
  padding: 64px 0;
}

.muted-section {
  background: rgba(15, 23, 42, 0.48);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
}

.section-more {
  padding: 10px 16px;
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
}

.featured-side {
  display: grid;
  gap: 18px;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.poster-frame {
  position: relative;
  display: block;
  height: 284px;
  overflow: hidden;
  background: #111827;
}

.featured-large .poster-frame {
  height: 390px;
}

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

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.82));
  opacity: 0.74;
}

.card-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  left: 12px;
  padding: 6px 10px;
  color: #111827;
  background: #fbbf24;
}

.rank-badge {
  right: 12px;
  min-width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.3);
}

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

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.compact-card {
  flex-direction: row;
  min-height: 150px;
}

.compact-card .poster-frame {
  width: 37%;
  min-width: 132px;
  height: auto;
}

.compact-card .card-body {
  flex: 1;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.movie-rail .movie-card {
  flex: 0 0 280px;
}

.rail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -54px;
  margin-bottom: 18px;
}

.rail-actions button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
  font-size: 26px;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.2), transparent 28%), linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
}

.page-hero h1,
.category-hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-hero p,
.category-hero p {
  max-width: 740px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-bg,
.category-shade {
  position: absolute;
  inset: 0;
}

.category-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.category-tile:hover .category-bg {
  transform: scale(1.08);
}

.category-shade {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.88));
}

.category-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
}

.category-content strong {
  font-size: 24px;
}

.category-content span {
  color: #dbeafe;
  line-height: 1.65;
}

.category-hero {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.category-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.24)), linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.98));
}

.category-hero-content {
  position: relative;
  z-index: 1;
}

.breadcrumb,
.detail-breadcrumbs a {
  color: #fbbf24;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.filter-title {
  margin-bottom: 14px;
  color: #f8fafc;
  font-weight: 800;
  font-size: 18px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
}

.filter-controls input,
.filter-controls select {
  height: 46px;
  padding: 0 15px;
  border-radius: 14px;
}

.filter-empty {
  margin-top: 16px;
  color: #fbbf24;
}

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

.detail-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 22px;
}

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

.detail-primary {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78));
}

.player-button,
.player-cover-title {
  position: relative;
  z-index: 1;
}

.player-button {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.36);
}

.player-cover-title {
  max-width: 80%;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.75);
}

.detail-card,
.story-card,
.poster-panel,
.related-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.detail-card,
.story-card,
.related-panel {
  padding: 24px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

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

.detail-category {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  color: #cbd5e1;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
}

.detail-one-line {
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
}

.story-card h2,
.related-panel h2,
.site-footer h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.story-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.9;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.detail-aside {
  display: grid;
  align-content: start;
  gap: 22px;
}

.poster-panel {
  overflow: hidden;
}

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

.poster-panel div {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster-panel strong {
  font-size: 22px;
}

.poster-panel span {
  color: var(--muted);
}

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

.related-list .compact-card .poster-frame {
  min-width: 112px;
}

.detail-related-section {
  padding-top: 42px;
}

.site-footer {
  margin-top: 30px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  font-size: 20px;
  font-weight: 800;
}

.site-footer p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: #64748b;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

@media (max-width: 860px) {
  .nav-inner {
    height: 68px;
  }

  .header-search {
    display: none;
  }

  .brand-title {
    font-size: 19px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .detail-title-row {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  .hero-carousel {
    height: 520px;
  }

  .hero-copy {
    padding-top: 10px;
  }

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

  .content-section {
    padding: 44px 0;
  }

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

  .poster-frame,
  .featured-large .poster-frame {
    height: 330px;
  }

  .compact-card .poster-frame {
    min-width: 118px;
  }

  .rail-actions {
    margin-top: 0;
  }

  .page-hero,
  .category-hero {
    padding: 62px 0 52px;
  }

  .player-cover-title {
    font-size: 18px;
  }
}
