:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f9fafb;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1180px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
}

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

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber);
  background: var(--amber-soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
}

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

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.poster-image.is-loaded,
.hero-image.is-loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 14px;
  font-weight: 800;
}

.hero-content .eyebrow {
  color: #fbbf24;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(251, 191, 36, 0.45);
  backdrop-filter: blur(8px);
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0 18px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-meta,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.meta-row span {
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.25);
}

.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-arrow.left {
  left: 20px;
}

.hero-arrow.right {
  right: 20px;
}

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

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

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

.home-search,
.content-section,
.page-hero,
.filter-panel,
.detail-main,
.breadcrumb,
.detail-hero,
.watch-section,
.article-section {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.home-search {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.home-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.watch-section h2,
.article-section h2 {
  margin: 0;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-search h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.home-search p,
.section-heading p,
.page-hero p,
.card-body p,
.article-section p,
.footer-inner p {
  color: var(--muted);
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.section-heading p {
  margin: 8px 0 0;
  max-width: 760px;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--amber);
  font-weight: 800;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid #fde68a;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.08);
  transition: all 0.2s ease;
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 20px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #f59e0b;
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.14);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  transition: all 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 10%, rgba(251, 191, 36, 0.36), transparent 28%),
    linear-gradient(145deg, #111827, #92400e 58%, #f59e0b);
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: rgba(217, 119, 6, 0.92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.86);
}

.card-body {
  padding: 14px;
}

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

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

.card-body p {
  margin: 0 0 12px;
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.compact-card .poster {
  aspect-ratio: auto;
  min-height: 168px;
}

.page-main,
.detail-main {
  padding: 40px 24px 80px;
}

.page-hero {
  padding: 48px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 58px);
}

.small-hero p {
  max-width: 860px;
  margin: 14px 0 0;
  font-size: 18px;
}

.filter-panel {
  margin-top: 28px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-box {
  flex: 1;
  display: grid;
  gap: 8px;
  color: #111827;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #111827;
  outline: none;
}

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

.filter-count {
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 32px;
  border-radius: 32px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.18);
}

.detail-info h1 {
  margin-top: 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0;
  color: #4b5563;
  font-size: 20px;
}

.detail-tags {
  margin: 18px 0 24px;
}

.watch-section,
.article-section {
  margin-top: 34px;
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.watch-section h2,
.article-section h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.35), transparent 24%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.35);
  font-size: 30px;
  text-indent: 4px;
}

.article-section p {
  margin: 0 0 26px;
  font-size: 18px;
}

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

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #d1d5db;
}

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

.footer-links a {
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

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

  .menu-button {
    display: block;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

  .hero-arrow {
    display: none;
  }

  .home-search,
  .split-heading,
  .footer-inner,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .page-main,
  .detail-main {
    padding: 24px 14px 64px;
  }

  .content-section {
    padding: 46px 14px 0;
  }

  .home-search,
  .page-hero,
  .detail-hero,
  .watch-section,
  .article-section {
    padding: 22px;
    border-radius: 24px;
  }

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

  .compact-card {
    grid-template-columns: 102px 1fr;
  }

  .compact-card .poster {
    min-height: 154px;
  }

  .hero h1 {
    font-size: 42px;
  }
}
