:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: rgba(17, 24, 39, 0.08);
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f8fafc 100%);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.nav-shell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.24);
}

.brand-text {
  font-size: 20px;
}

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

.main-nav a,
.mobile-panel a {
  color: #374151;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  height: 680px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 48%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 150px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 640px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.hero-tags span {
  padding: 7px 12px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.rank-play,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 18px 35px rgba(217, 119, 6, 0.34);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.rank-play:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn.light {
  color: #111827;
  border-color: var(--line);
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

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

.hero-panel {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 66px;
  z-index: 5;
  width: 330px;
  padding: 18px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  backdrop-filter: blur(18px);
}

.hero-panel p {
  margin: 0 0 12px;
  color: #fde68a;
  font-weight: 800;
}

.hero-mini-list {
  display: grid;
  gap: 10px;
}

.small-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
}

.small-card img {
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 12px;
}

.small-card strong,
.small-card em {
  display: block;
}

.small-card strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.small-card em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
}

.content-section,
.search-band {
  margin-top: 64px;
}

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

.section-head h2,
.search-band h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
  margin: 0;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head h2,
.search-band h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-more,
.text-link,
.rank-play {
  color: var(--amber-dark);
  padding: 10px 16px;
  background: var(--amber-soft);
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.64));
  opacity: 0.8;
}

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  background: var(--amber);
  border-radius: 999px;
}

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

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line span {
  padding: 4px 8px;
  background: #f9fafb;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--amber-dark);
  background: #fffbeb;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.86;
  transform: scale(1.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.82));
}

.category-tile span {
  position: absolute;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 2;
  color: #ffffff;
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.filter-form {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 12px;
}

.filter-input,
.filter-select,
.filter-type {
  width: 100%;
  min-height: 48px;
  color: #111827;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  padding: 0 14px;
}

.filter-input:focus,
.filter-select:focus,
.filter-type:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 116px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  background: #111827;
  border-radius: 14px;
}

.rank-cover img {
  width: 116px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: #4b5563;
}

.page-hero {
  margin-top: 36px;
  padding: 68px 42px;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(135deg, #111827 0%, #1f2937 50%, #78350f 100%);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.page-hero .eyebrow {
  color: #fde68a;
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 5vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.center-actions {
  justify-content: center;
}

.category-overview-grid {
  display: grid;
  gap: 20px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.category-overview-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 22px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p:not(.eyebrow) {
  color: #4b5563;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.inline-links a {
  color: var(--amber-dark);
  padding: 6px 10px;
  background: #fffbeb;
  border-radius: 999px;
  font-size: 13px;
}

.detail-page {
  margin-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #6b7280;
  margin-bottom: 18px;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 4%, rgba(245, 158, 11, 0.28), transparent 32%),
    linear-gradient(135deg, #111827, #1f2937 55%, #78350f);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.detail-info .eyebrow {
  color: #fde68a;
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(38px, 5vw, 66px);
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

.player-stage {
  position: relative;
  overflow: hidden;
  background: #050816;
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050816;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.18), rgba(0, 0, 0, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-orb {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(217, 119, 6, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

.player-cover strong {
  font-size: clamp(20px, 4vw, 34px);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 34px;
}

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

.detail-text h2 {
  font-size: 28px;
}

.detail-text p:not(.eyebrow) {
  color: #374151;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: #111827;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 0;
}

.footer-shell p {
  margin: 8px 0 0;
  color: #9ca3af;
}

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

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

.is-filtered-out {
  display: none !important;
}

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

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

  .hero-panel {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    height: 620px;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-band,
  .detail-hero,
  .detail-text,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-row {
    grid-template-columns: 44px 90px 1fr;
  }

  .rank-play {
    grid-column: 2 / -1;
  }

  .rank-cover img {
    width: 90px;
    height: 64px;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .content-section,
  .search-band,
  .detail-page,
  .page-hero {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero {
    padding: 48px 22px;
    border-radius: 26px;
  }

  .detail-hero {
    padding: 18px;
    border-radius: 26px;
  }

  .detail-text article {
    padding: 22px;
  }
}
