:root {
  --bg: #070b14;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(127, 29, 29, 0.42);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fde68a;
  --red: #991b1b;
  --red-deep: #450a0a;
  --radius: 22px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(153, 27, 27, 0.22), transparent 36%),
    linear-gradient(180deg, #111827 0%, #070b14 42%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 48%, #dc2626);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.35);
}

.logo-text {
  font-size: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(90deg, #fde68a, #fecaca, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-nav-link {
  color: #e5e7eb;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--amber-light);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #f8fafc;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(248, 250, 252, 0.1);
}

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

.mobile-nav-link {
  padding: 12px 4px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: clamp(640px, 82vh, 860px);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(69, 10, 10, 0.45) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.26) 46%, rgba(2, 6, 23, 0.8) 100%);
  backdrop-filter: blur(3px);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(640px, 82vh, 860px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: 72px 0 96px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber-light);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 80px rgba(0, 0, 0, 0.56);
}

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

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

.hero-tags {
  margin: 28px 0 0;
}

.hero-tag,
.tag,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.68);
}

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

.button-primary,
.button-secondary,
.inline-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary,
.inline-search button,
.search-page-form button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b 48%, #dc2626);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.button-secondary {
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(15, 23, 42, 0.7);
}

.button-primary:hover,
.button-secondary:hover,
.inline-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(245, 158, 11, 0.34);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(253, 230, 138, 0.25);
  border-radius: 22px;
  z-index: 1;
  pointer-events: none;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

.hero-next {
  right: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.search-band {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: 28px;
  margin-top: -48px;
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(69, 10, 10, 0.82));
  box-shadow: var(--shadow);
}

.search-band h2,
.section-heading h2,
.page-hero-small h1,
.detail-box h2 {
  margin: 0;
  color: #f8fafc;
  letter-spacing: -0.03em;
}

.search-band h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.search-band p,
.section-heading p,
.page-hero-small p,
.movie-card p,
.detail-box p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.inline-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.inline-search input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #f8fafc;
  outline: none;
  background: rgba(2, 6, 23, 0.52);
}

.inline-search input:focus,
.search-page-form input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.page-top {
  padding-top: 44px;
}

.content-section {
  margin-bottom: 72px;
}

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

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-heading p {
  margin: 8px 0 0;
}

.section-more {
  color: var(--amber-light);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 70px rgba(127, 29, 29, 0.28);
}

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

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: white;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.36);
}

.movie-card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.55);
}

.movie-card h3 {
  margin: 10px 0 0;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 52px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.tag-row {
  gap: 8px;
}

.tag {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 44% 1fr;
}

.movie-card-wide .poster-link img {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-small {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 150px;
}

.movie-card-small .poster-link img {
  height: 100%;
  min-height: 150px;
  aspect-ratio: auto;
}

.movie-card-small p,
.movie-card-small .tag-row {
  display: none;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 22px;
  background: #0f172a;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.76;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.92));
}

.category-name,
.category-intro {
  position: relative;
  z-index: 1;
}

.category-name {
  font-size: 24px;
  font-weight: 900;
}

.category-intro {
  margin-top: 8px;
  color: #e2e8f0;
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

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

.page-hero-small {
  margin-bottom: 36px;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(69, 10, 10, 0.78)),
    radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.22), transparent 32%);
  box-shadow: var(--shadow);
}

.page-hero-small h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero-small p {
  max-width: 780px;
  margin: 14px 0 0;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--soft);
}

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

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 36px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-size: 30px;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #dc2626);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
}

.watch-info {
  padding: 10px 0;
}

.watch-info h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.lead-text {
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.7;
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  margin-top: 18px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 68px;
}

.detail-box {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-box h2 {
  font-size: 26px;
}

.detail-box p {
  margin: 16px 0 0;
  font-size: 17px;
}

.search-page-form {
  max-width: 760px;
  margin-top: 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
}

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

.footer-logo {
  margin-bottom: 12px;
  color: var(--amber-light);
  font-size: 22px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #f8fafc;
}

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

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: var(--soft);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .hero-content,
  .watch-layout,
  .search-band,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-content {
    padding-top: 44px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .wide-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide,
  .movie-card-small {
    grid-template-columns: 1fr;
  }

  .movie-card-small .poster-link img {
    aspect-ratio: 2 / 3;
  }

  .inline-search,
  .search-page-form,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .search-band,
  .page-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .hero h1,
  .watch-info h1,
  .page-hero-small h1 {
    letter-spacing: -0.04em;
  }

  .search-band,
  .page-hero-small,
  .detail-box {
    padding: 22px;
  }
}
