:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --night: #0f172a;
  --red: #ef4444;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: 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;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 1.24rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  color: #374151;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease;
}

.desktop-nav a {
  padding: 10px 13px;
  border-radius: 999px;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--amber-dark);
}

.desktop-nav a:hover {
  background: #fff7ed;
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.top-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
}

.top-search button,
.primary-btn,
.secondary-btn,
.section-link,
.search-submit {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.top-search button,
.primary-btn,
.search-submit {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.18);
}

.top-search button {
  padding: 9px 16px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  gap: 10px;
}

.mobile-panel.is-open {
  display: grid;
}

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

main {
  min-height: 68vh;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.35), transparent 28%), linear-gradient(135deg, #111827 0%, #1f2937 42%, #4c1d1d 100%);
}

.hero-shell {
  position: relative;
  max-width: 1240px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 22px 64px;
}

.hero-slide {
  display: none;
  min-height: 500px;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: 44px;
}

.hero-slide.is-active {
  display: grid;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.2);
}

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

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1,
.hero h2 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

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

.primary-btn,
.secondary-btn,
.section-link,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.secondary-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tags span,
.tag-row span,
.meta-chip,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.22);
}

.hero-poster-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.hero-poster-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  background: linear-gradient(135deg, #1f2937, #78350f);
}

.hero-poster-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.15rem;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 22px;
  bottom: 32px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.content-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px;
}

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

.section-heading h2,
.page-title h1,
.detail-text h2,
.player-section h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-title p {
  margin-top: 8px;
  color: var(--muted);
}

.section-link {
  color: var(--amber-dark);
  background: #fff7ed;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.3s ease;
}

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

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.93rem;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

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

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.play-corner,
.rank-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.play-corner {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--amber));
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: var(--amber-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: #92400e;
  background: #fffbeb;
}

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

.hot-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
}

.hot-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #111827;
}

.hot-item strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.hot-item span {
  color: var(--amber-dark);
  font-weight: 900;
}

.hot-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.28), transparent 32%), linear-gradient(135deg, #111827, #312e81 48%, #7f1d1d);
}

.page-title {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 22px;
}

.page-title h1 {
  max-width: 880px;
}

.page-title p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.filter-panel input,
.filter-panel select,
.search-box input,
.search-box select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus,
.search-box select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
}

.detail-hero-bg img {
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.2);
}

.detail-hero-shell {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: end;
}

.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.detail-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.detail-poster {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  background: #111827;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.meta-chip {
  padding: 8px 12px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.player-section,
.detail-text,
.related-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 0;
}

.player-shell {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
}

.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: radial-gradient(circle at center, rgba(245, 158, 11, 0.28), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-bubble {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.3);
  font-size: 2rem;
}

.player-overlay strong {
  display: block;
  font-size: 1.18rem;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.text-panel,
.side-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.text-panel p,
.side-panel p {
  color: #374151;
}

.text-panel p + h2 {
  margin-top: 28px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.info-list span {
  color: var(--muted);
}

.info-list strong {
  text-align: right;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 160px 160px auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
}

.search-results-note {
  margin: 20px 0;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 40px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-shell p {
  max-width: 620px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a {
  color: #d1d5db;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 22px;
  text-align: center;
  color: #9ca3af;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: #ffffff;
}

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

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

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

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

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

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

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

  .hero-shell {
    min-height: auto;
    padding-top: 48px;
  }

  .detail-poster {
    max-width: 280px;
  }

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

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

@media (max-width: 640px) {
  .nav-shell,
  .content-shell,
  .page-title,
  .detail-hero-shell,
  .player-section,
  .detail-text,
  .related-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.55rem;
  }

  .movie-grid,
  .rank-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-card p {
    min-height: 40px;
    font-size: 0.86rem;
  }

  .category-card {
    min-height: 190px;
  }

  .hot-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
