:root {
  color-scheme: light;
  --site-bg: #fff7ed;
  --site-panel: rgba(255, 255, 255, 0.84);
  --site-panel-solid: #ffffff;
  --site-text: #111827;
  --site-muted: #6b7280;
  --site-border: rgba(251, 191, 36, 0.28);
  --site-accent: #d97706;
  --site-accent-strong: #ea580c;
  --site-accent-soft: #fef3c7;
  --site-shadow: 0 20px 55px rgba(146, 64, 14, 0.14);
  --site-radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--site-text);
  background:
    radial-gradient(circle at 8% -10%, rgba(251, 191, 36, 0.32), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(249, 115, 22, 0.22), transparent 28rem),
    linear-gradient(135deg, #f8fafc 0%, #fff7ed 46%, #ffedd5 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  color: var(--site-accent);
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  color: #374151;
  font-weight: 700;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--site-accent);
}

.header-search {
  position: relative;
  width: min(18rem, 26vw);
}

.header-search input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 1px solid rgba(209, 213, 219, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.filter-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.mobile-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 0.95rem;
  color: #374151;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 1rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.75rem;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 2rem));
  min-height: clamp(520px, 68vw, 690px);
  margin: 2rem auto 0;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--site-shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(17rem, 0.62fr);
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4.8rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.025);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.28) 100%),
    radial-gradient(circle at 18% 24%, rgba(245, 158, 11, 0.36), transparent 22rem);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: #92400e;
  background: rgba(254, 243, 199, 0.92);
  font-size: 0.84rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 16ch;
  margin: 1rem 0;
  color: #ffffff;
  font-size: clamp(2.55rem, 6vw, 5.35rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero-content p {
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.8;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.8rem;
  font-weight: 750;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font-weight: 850;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.25);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.btn-ghost {
  color: #92400e;
  background: #fef3c7;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: center;
  width: min(100%, 21rem);
  transform: rotate(3deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  width: 100%;
  border: 4px solid rgba(255, 255, 255, 0.74);
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-controls {
  position: absolute;
  right: clamp(1.2rem, 4vw, 2.2rem);
  bottom: clamp(1.2rem, 4vw, 2.2rem);
  z-index: 3;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 2.2rem;
  background: #f59e0b;
}

.content-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title h1,
.section-title h2 {
  margin: 0.65rem 0 0;
  font-size: clamp(1.8rem, 3.8vw, 3rem);
  font-weight: 920;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.section-title p,
.category-intro,
.detail-copy p {
  color: var(--site-muted);
  line-height: 1.8;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(146, 64, 14, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.poster-link img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.badge,
.play-mini {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 850;
}

.badge {
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.28rem 0.58rem;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.76rem;
}

.play-mini {
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.28);
}

.movie-card-body {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
}

.movie-card h2,
.movie-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover {
  color: var(--site-accent);
}

.movie-meta {
  color: #6b7280;
  font-size: 0.82rem;
}

.line-clamp-2,
.movie-card-body p:last-of-type {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card,
.search-panel,
.info-panel,
.detail-card,
.player-card {
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-panel);
  box-shadow: var(--site-shadow);
}

.category-card {
  display: grid;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 1.25rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.62);
  transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.search-panel {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
  padding: 1rem;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 18px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.rank-number {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 1.1rem;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 950;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  font-weight: 850;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.35rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: #92400e;
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.36fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.detail-card {
  overflow: hidden;
}

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

.info-panel,
.player-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.info-panel h1 {
  margin: 0.7rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: #4b5563;
  font-weight: 700;
}

.detail-copy {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.detail-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.player-card {
  margin-top: 1.5rem;
}

.player-card h2 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.3);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.68));
  cursor: pointer;
}

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

.play-button-large {
  display: grid;
  width: clamp(4.5rem, 10vw, 6.8rem);
  height: clamp(4.5rem, 10vw, 6.8rem);
  place-items: center;
  border-radius: 999px;
  padding-left: 0.25rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 20px 55px rgba(234, 88, 12, 0.38);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  color: #6b7280;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-weight: 750;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(245, 158, 11, 0.42);
  border-radius: 20px;
  padding: 2rem;
  color: #92400e;
  background: rgba(254, 243, 199, 0.5);
  text-align: center;
}

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

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
  }

  .hero-poster {
    display: none;
  }

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

@media (max-width: 720px) {
  .hero-slider {
    min-height: 620px;
    border-radius: 24px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 3.4rem minmax(0, 1fr);
  }

  .rank-item .btn-ghost {
    grid-column: 1 / -1;
  }
}
