
:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --blue: #1e3a8a;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.18), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.2), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.logo {
  font-size: 24px;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #fbbf24;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-open,
.menu-toggle,
.hero-prev,
.hero-next,
.filter-button,
.search-close {
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.search-open {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 18px;
  color: #cbd5e1;
}

.mobile-nav.open {
  display: flex;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cover {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 48%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 98px;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 42px rgba(0, 0, 0, 0.5);
}

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

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.28);
}

.primary-button.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.5);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 48px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-prev,
.hero-next {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hero-dot.active {
  background: #fbbf24;
}

.content-section {
  padding: 64px 0;
}

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

.section-head h2,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.section-more {
  min-height: 40px;
  padding: 0 18px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.86));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.82) 100%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #111827;
  background: #fbbf24;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-style: normal;
}

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

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

.movie-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-meta,
.movie-one {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-one {
  display: -webkit-box;
  min-height: 46px;
  margin-top: 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(37, 99, 235, 0.12)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.45);
}

.category-card span,
.category-overview-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 170px;
}

.category-overview-card img {
  width: 110px;
  height: 140px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.72));
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 26px;
  align-items: stretch;
}

.tight-head {
  margin-bottom: 20px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(15, 23, 42, 0.78);
}

.ranking-row span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.ranking-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-feature {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
}

.rank-feature img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.rank-feature div {
  padding: 24px;
}

.rank-feature span {
  color: #fbbf24;
  font-weight: 800;
}

.rank-feature h3 {
  margin: 10px 0;
  font-size: 28px;
}

.rank-feature p {
  color: #cbd5e1;
  line-height: 1.8;
}

.sub-hero {
  padding: 86px 0 46px;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(30, 58, 138, 0.34), transparent);
}

.sub-hero h1 {
  font-size: clamp(38px, 7vw, 68px);
}

.sub-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.filter-button.active,
.filter-button:hover {
  color: #111827;
  background: #fbbf24;
}

.local-search,
.global-search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  font: inherit;
}

.local-search {
  padding: 0 16px;
}

.global-search-input {
  margin-top: 18px;
  padding: 14px 18px;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  padding: 86px 16px 32px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(12px);
}

.search-modal.open {
  display: grid;
}

.search-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel-strong);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
}

.search-panel h2 {
  margin: 0;
  font-size: 30px;
}

.search-close {
  float: right;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-result {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  background: rgba(30, 41, 59, 0.68);
}

.search-result img {
  width: 70px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.search-result strong {
  display: block;
  margin-bottom: 6px;
}

.search-result span,
.search-result p {
  color: var(--muted);
  font-size: 13px;
}

.search-result p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: end;
  min-height: 620px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 28px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #cbd5e1;
}

.breadcrumb a {
  color: #fbbf24;
  text-decoration: none;
}

.detail-info h1 {
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
}

.detail-one {
  max-width: 840px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

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

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

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.68));
}

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

.player-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 22px 55px rgba(245, 158, 11, 0.36);
  cursor: pointer;
  font-size: 34px;
}

.detail-article,
.detail-side {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 2;
}

.detail-article p:last-child {
  margin-bottom: 0;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.side-list img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.side-list span {
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 14px;
  font-size: 22px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

.movie-card.is-hidden {
  display: none;
}

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

  .desktop-nav {
    gap: 14px;
  }
}

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

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

  .hero {
    min-height: 620px;
  }

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

  .hero-controls {
    left: 16px;
    right: auto;
  }

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

  .rank-layout,
  .detail-layout,
  .footer-grid,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    align-items: end;
    gap: 24px;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }

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

  .local-search {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 20px;
  }

  .hero {
    height: 78vh;
    min-height: 610px;
  }

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

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

  .category-overview-card {
    grid-template-columns: 90px 1fr;
  }

  .category-overview-card img {
    width: 90px;
    height: 118px;
  }

  .ranking-row {
    grid-template-columns: 40px 1fr;
  }

  .ranking-row em {
    grid-column: 2;
  }

  .detail-info h1 {
    font-size: 40px;
  }

  .detail-one {
    font-size: 17px;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

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