* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.9);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(250, 204, 21, 0.14);
  --gold: #facc15;
  --amber: #f59e0b;
  --shadow: 0 22px 80px rgba(250, 204, 21, 0.15);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(250, 204, 21, 0.12), transparent 26rem),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.1), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 52%, #0f172a 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 10px 35px rgba(250, 204, 21, 0.32);
}

.brand-name {
  font-size: 1.25rem;
}

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

.nav-link,
.mobile-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--gold);
  background: rgba(250, 204, 21, 0.09);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.mobile-search input,
.filter-input,
.search-page-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  width: 210px;
  padding-left: 10px;
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-btn,
.secondary-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-btn {
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 12px 32px rgba(250, 204, 21, 0.22);
}

.top-search button,
.mobile-search button {
  padding: 8px 14px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
}

.secondary-btn {
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.secondary-btn:hover,
.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.75);
}

.mobile-menu {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.2) 58%, rgba(15, 23, 42, 0.65) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.75);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 14px rgba(250, 204, 21, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 1.12rem;
}

.hero-actions,
.section-title-row,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section,
.page-section {
  padding: 64px 0;
}

.section.alt {
  background: rgba(30, 41, 59, 0.24);
}

.section-title-row {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-kicker .icon {
  font-size: 1.9rem;
}

.section h2,
.page-title h1,
.detail-article h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.16;
}

.section-lead,
.page-title p,
.category-card p,
.detail-article p,
.search-intro {
  color: var(--muted);
}

.view-more {
  color: var(--gold);
  font-weight: 800;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.1);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(30, 41, 59, 0.94);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #020617;
}

.poster-wrap img,
.list-thumb img,
.detail-poster img,
.related-thumb img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img,
.list-thumb img,
.related-thumb img {
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img,
.movie-card:hover .list-thumb img,
.related-card:hover .related-thumb img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, transparent 55%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #0f172a;
  background: var(--gold);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.poster-badges span,
.tag-row span,
.info-pill,
.hero-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.poster-badges span {
  padding: 5px 9px;
  color: #0f172a;
  background: rgba(250, 204, 21, 0.92);
  font-size: 0.75rem;
  font-weight: 800;
}

.poster-badges span:last-child {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.82);
}

.card-body {
  padding: 18px;
}

.card-body h3,
.list-info h3,
.related-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3,
.related-card:hover h3,
.rank-row:hover .rank-title {
  color: var(--gold);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.info-pill,
.hero-tag {
  padding: 5px 9px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.14);
  font-size: 0.78rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 196px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.46);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.category-card .arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.category-card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.95fr);
  gap: 28px;
}

.list-stack {
  display: grid;
  gap: 16px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 16px;
  padding: 10px;
}

.list-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  background: #020617;
}

.play-dot {
  position: absolute;
  inset: auto 10px 10px auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0f172a;
  background: var(--gold);
}

.list-info {
  min-width: 0;
  padding: 8px 8px 8px 0;
}

.rank-panel,
.filter-panel,
.detail-panel,
.search-box,
.detail-article,
.player-card {
  border: 1px solid rgba(250, 204, 21, 0.1);
  border-radius: var(--radius);
  background: var(--panel);
}

.rank-panel {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: rgba(15, 23, 42, 0.55);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-weight: 900;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.8);
}

.rank-gold,
.rank-silver,
.rank-bronze {
  color: #0f172a;
}

.rank-gold {
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.rank-silver {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
}

.rank-bronze {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #92400e);
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-views {
  color: var(--muted);
  font-size: 0.86rem;
}

.page-hero {
  padding: 54px 0 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.page-title {
  max-width: 850px;
}

.page-title p {
  max-width: 760px;
  font-size: 1.04rem;
  line-height: 1.75;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
}

.filter-input {
  flex: 1 1 260px;
  padding: 13px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-chip {
  cursor: pointer;
  border: 1px solid rgba(250, 204, 21, 0.15);
  border-radius: 999px;
  padding: 11px 15px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.4);
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #0f172a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 28px;
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 26px 90px rgba(250, 204, 21, 0.1);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  color: #0f172a;
  background: #000;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.16));
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 18px 50px rgba(250, 204, 21, 0.34);
  transform: translate(-50%, -50%);
}

.detail-article {
  padding: 30px;
}

.detail-article h1 {
  margin-bottom: 14px;
}

.detail-meta,
.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta {
  margin-bottom: 22px;
  color: #cbd5e1;
}

.detail-article h2 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}

.detail-article p {
  line-height: 1.9;
}

.detail-panel {
  overflow: hidden;
  margin-bottom: 22px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  background: #020617;
}

.detail-side-body {
  padding: 20px;
}

.detail-side-body h3 {
  margin: 0 0 12px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(250, 204, 21, 0.1);
  background: rgba(30, 41, 59, 0.66);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.42);
}

.related-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #020617;
}

.related-card h3 {
  padding: 13px;
  font-size: 0.94rem;
}

.search-box {
  padding: 24px;
  margin: 28px 0;
}

.search-page-form {
  display: flex;
  gap: 12px;
}

.search-page-form input {
  flex: 1;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.search-page-form button {
  padding: 0 24px;
}

.empty-state {
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 56px;
  padding: 38px 0;
  color: var(--muted);
  border-top: 1px solid rgba(250, 204, 21, 0.12);
  background: rgba(2, 6, 23, 0.38);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.6);
}

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

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

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

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

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

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

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

  .mobile-search {
    align-items: stretch;
  }

  .mobile-search input {
    flex: 1;
    padding-left: 10px;
  }

  .hero {
    height: 560px;
  }

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

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

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

  .brand-name {
    font-size: 1rem;
  }

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding-top: 26px;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .section,
  .page-section {
    padding: 42px 0;
  }

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

  .movie-card-list {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .list-info p {
    -webkit-line-clamp: 2;
  }

  .detail-article {
    padding: 22px;
  }

  .search-page-form {
    flex-direction: column;
  }

  .search-page-form button {
    padding: 13px 18px;
  }
}
