:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --amber: #f59e0b;
  --orange: #f97316;
  --green: #10b981;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.38);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fbbf24;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.hero-carousel {
  position: relative;
  height: min(760px, 72vh);
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 28%, rgba(245, 158, 11, 0.30), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.05));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 88px;
  width: min(680px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(251, 191, 36, 0.36);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.hero-content p {
  max-width: 650px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn,
.search-button,
.play-cover button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-button:hover,
.play-cover button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
  font-size: 36px;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #fbbf24;
}

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

.main-container {
  padding: 54px 0 70px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  color: #111827;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  min-height: 40px;
  color: #92400e;
  background: #fef3c7;
}

.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 {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
}

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

.movie-card-horizontal .poster-wrap {
  aspect-ratio: 4 / 3;
}

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

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

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-content {
  display: flex;
  min-height: 190px;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card-horizontal .card-content {
  min-height: 0;
}

.card-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-content p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  padding-top: 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.tag-row {
  margin-top: 10px;
}

.site-section {
  margin-top: 58px;
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 176px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.15);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #92400e, #f97316);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #064e3b, #10b981);
}

.category-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}

.category-card p {
  margin: 14px 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 14px;
}

.category-card span {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.top-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

.top-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
}

.top-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e293b 58%, #111827);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.035em;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.5fr) minmax(150px, 0.5fr);
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.empty-message {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 78px 156px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-size: 22px;
  font-weight: 950;
}

.ranking-poster {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hot-score {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 800;
}

.detail-container {
  padding: 42px 0 74px;
}

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

.detail-main,
.detail-side,
.player-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.10);
}

.player-card {
  overflow: hidden;
  margin-bottom: 26px;
}

.player-box {
  position: relative;
  background: #020617;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12)),
    radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 46%);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-cover button {
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  font-size: 18px;
}

.detail-main {
  padding: 28px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 900;
}

.detail-main p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 16px;
}

.detail-tags {
  margin: 20px 0 26px;
}

.detail-side {
  padding: 20px;
}

.side-poster {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.info-list strong {
  color: #111827;
}

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

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p {
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .ranking-list {
    grid-template-columns: 1fr;
  }

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

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

  .nav-toggle {
    display: block;
  }

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

  .hero-carousel {
    height: 620px;
    min-height: 620px;
  }

  .hero-content {
    bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content p {
    font-size: 16px;
  }

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

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

  .card-content {
    min-height: 172px;
    padding: 13px;
  }

  .card-content h3 {
    font-size: 16px;
  }

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

  .ranking-item {
    grid-template-columns: 52px 92px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
  }

  .ranking-info h3 {
    font-size: 17px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.compact,
  .search-results,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .top-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .search-button {
    width: 100%;
  }
}
