:root {
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: #292524;
  --panel-light: #44403c;
  --line: #57534e;
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-soft: #78716c;
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.18);
  --danger: #ef4444;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 20% 0, rgba(217, 119, 6, 0.16), transparent 34%), var(--bg);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.94);
  border-bottom: 1px solid rgba(120, 113, 108, 0.35);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  color: #fff7ed;
  letter-spacing: 0.04em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-links a {
  color: #d6d3d1;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
  color: #e7e5e4;
  background: #1c1917;
  border: 1px solid #44403c;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 220px;
  padding: 10px 12px;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.nav-search button,
.hero-actions a,
.hero-actions button,
.cta-button,
.search-submit {
  border: 0;
  border-radius: 12px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  font-weight: 900;
  padding: 10px 16px;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.hero-actions a:hover,
.hero-actions button:hover,
.cta-button:hover,
.search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.36);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid #44403c;
  border-radius: 12px;
  background: #1c1917;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #f5f5f4;
  border-radius: 99px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: linear-gradient(180deg, #1c1917 0%, #0c0a09 100%);
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 56px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero:before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 strong {
  color: var(--brand);
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #d6d3d1;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.16);
  border: 1px solid rgba(217, 119, 6, 0.26);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-actions .ghost {
  color: #f5f5f4;
  background: rgba(68, 64, 60, 0.65);
  border: 1px solid rgba(245, 245, 244, 0.16);
  box-shadow: none;
}

.hero-media {
  position: relative;
  z-index: 2;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  background: #292524;
  box-shadow: var(--shadow);
}

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

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.76));
}

.hero-card-note {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-card-note strong {
  display: block;
  font-size: 20px;
}

.hero-card-note span {
  color: #d6d3d1;
  font-size: 13px;
}

.hero-play {
  width: 54px;
  height: 54px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: #f59e0b;
}

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

.hero-dots button {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 245, 244, 0.24);
}

.hero-dots button.is-active {
  background: var(--brand);
}

.page-shell,
.section-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  padding: 46px 0 72px;
}

.section-shell {
  padding: 62px 0;
}

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

.section-head span {
  display: inline-flex;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-head a {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 900;
}

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

.category-card {
  min-height: 148px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(68, 64, 60, 0.88), rgba(28, 25, 23, 0.92));
  border: 1px solid rgba(120, 113, 108, 0.32);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.88), rgba(68, 64, 60, 0.92));
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: #d6d3d1;
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.9);
  border: 1px solid rgba(120, 113, 108, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.20);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.movie-cover {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 2 / 3;
  background: #1c1917;
}

.movie-cover img,
.rank-cover img,
.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img,
.rank-item:hover .rank-cover img,
.related-card:hover .related-cover img {
  transform: scale(1.08);
}

.movie-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .movie-cover:after {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #1c1917;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.movie-info {
  padding: 14px;
}

.movie-meta {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.movie-info h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info p {
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 28px 0;
  padding: 14px;
  border: 1px solid rgba(120, 113, 108, 0.3);
  border-radius: var(--radius-md);
  background: rgba(28, 25, 23, 0.76);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 68px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.86);
  border: 1px solid rgba(120, 113, 108, 0.25);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.rank-cover {
  overflow: hidden;
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #1c1917;
}

.rank-number {
  color: var(--brand);
  font-size: 30px;
  font-weight: 950;
}

.rank-body h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-body p {
  margin: 0 0 8px;
  color: var(--muted);
}

.page-title {
  padding: 42px 0 20px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

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

.detail-title {
  padding: 12px 0 0;
}

.detail-title .movie-meta {
  font-size: 15px;
}

.detail-tags {
  margin: 18px 0 24px;
}

.detail-copy {
  display: grid;
  gap: 18px;
  color: #d6d3d1;
}

.detail-copy section {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.78);
  border: 1px solid rgba(120, 113, 108, 0.22);
}

.detail-copy h2 {
  margin: 0 0 10px;
  color: #fff7ed;
  font-size: 22px;
}

.detail-copy p {
  margin: 0;
}

.player-section {
  margin-top: 42px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(0, 0, 0, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(217, 119, 6, 0.46);
}

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

.related-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.86);
  border: 1px solid rgba(120, 113, 108, 0.24);
}

.related-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #1c1917;
}

.related-card h3 {
  min-height: 44px;
  margin: 0;
  padding: 12px;
  font-size: 15px;
  line-height: 1.35;
}

.search-hero {
  padding: 58px 0 34px;
  text-align: center;
}

.search-box-large {
  display: flex;
  width: min(720px, 100%);
  margin: 24px auto 0;
  gap: 10px;
}

.search-box-large input {
  flex: 1;
  min-width: 0;
  padding: 15px 16px;
  color: #e7e5e4;
  background: #1c1917;
  border: 1px solid #44403c;
  border-radius: 14px;
  outline: none;
}

.search-results {
  padding-bottom: 72px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius-md);
  background: rgba(41, 37, 36, 0.78);
}

.empty-state.is-visible {
  display: block;
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #1c1917;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.back-top.is-visible {
  display: grid;
}

.site-footer {
  margin-top: 72px;
  background: #1c1917;
  border-top: 1px solid rgba(120, 113, 108, 0.28);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 38px;
  padding: 42px 0;
}

.footer-brand {
  color: #fff7ed;
  font-size: 22px;
  font-weight: 950;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(120, 113, 108, 0.2);
  padding: 18px 16px;
  color: var(--muted-soft);
  text-align: center;
  font-size: 14px;
}

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

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

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

  .hero-media {
    max-width: 420px;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  body.nav-open .nav-links,
  body.nav-open .nav-search {
    display: flex;
  }

  body.nav-open .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  body.nav-open .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #292524;
  }

  body.nav-open .nav-search input {
    width: 100%;
  }

  .hero,
  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    padding-top: 56px;
  }

  .hero-actions,
  .section-head,
  .search-box-large {
    flex-direction: column;
    align-items: stretch;
  }

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

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

@media (max-width: 640px) {
  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .rank-item {
    grid-template-columns: 64px 48px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-cover {
    width: 64px;
  }

  .rank-number {
    font-size: 22px;
  }

  .rank-body p {
    display: none;
  }

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

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

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
