:root {
  --yellow: #facc15;
  --yellow-dark: #ca8a04;
  --green: #86efac;
  --green-dark: #16a34a;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffbea 0%, #f8fafc 36%, #f3f4f6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #facc15 0%, #fde047 48%, #86efac 100%);
  box-shadow: 0 12px 30px rgba(202, 138, 4, 0.18);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #713f12;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ca8a04;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.38);
}

.brand-name {
  font-size: 20px;
  letter-spacing: 0.04em;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #713f12;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  transform: translateY(-1px);
}

.top-search {
  width: 292px;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.54);
}

.top-search input,
.mobile-panel input,
.search-page-form input,
.inline-filter {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.top-search input {
  padding: 0 12px;
}

.top-search button,
.search-page-form button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #111827;
  background: #facc15;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #713f12;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f9fafb;
  font-weight: 800;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: #f3f4f6;
}

.hero-wrap {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 24px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.38), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(34, 197, 94, 0.26), transparent 32%),
    linear-gradient(135deg, #fffbeb 0%, #f7fee7 52%, #ecfdf5 100%);
  box-shadow: var(--shadow);
}

.hero-orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.52;
  pointer-events: none;
}

.orbit-one {
  width: 280px;
  height: 280px;
  right: -80px;
  top: -80px;
  background: rgba(250, 204, 21, 0.42);
}

.orbit-two {
  width: 220px;
  height: 220px;
  left: -60px;
  bottom: -70px;
  background: rgba(134, 239, 172, 0.5);
}

.hero-slider {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 420px;
  align-items: center;
  gap: 42px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #854d0e;
  background: rgba(250, 204, 21, 0.24);
  font-size: 14px;
  font-weight: 900;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
  margin: 18px 0 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #111827;
  background: linear-gradient(90deg, #facc15, #eab308);
  box-shadow: 0 14px 26px rgba(202, 138, 4, 0.24);
}

.btn.ghost {
  color: #1f2937;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

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

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

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 60px rgba(31, 41, 55, 0.23);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fef3c7, #dcfce7);
}

.hero-controls {
  position: absolute;
  left: 42px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #713f12;
  background: rgba(255, 255, 255, 0.78);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(113, 63, 18, 0.28);
}

.hero-dot.active {
  width: 32px;
  background: #ca8a04;
}

.hero-category-strip {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
}

.hero-category-strip a {
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 58px auto;
}

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

.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 3vw, 36px);
}

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

.section-heading.small {
  margin-bottom: 14px;
}

.section-link,
.wide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  color: #854d0e;
  background: #fef3c7;
  font-weight: 900;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

.poster-link img {
  transition: transform 0.45s ease;
}

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

.card-pill {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #111827;
  background: #facc15;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card p {
  margin: 0;
  min-height: 48px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.large-card .card-body {
  padding: 22px;
}

.large-card h3 {
  font-size: 22px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.ranking-board {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-no {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #facc15, #ca8a04);
  font-weight: 900;
}

.rank-row img {
  width: 56px;
  height: 74px;
  border-radius: 12px;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: #ca8a04;
  font-size: 18px;
  font-weight: 900;
}

.wide-link {
  width: 100%;
  margin-top: 16px;
}

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

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #111827;
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.34), transparent 42%),
    linear-gradient(135deg, #ffffff, #f7fee7);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #854d0e;
  background: #fef3c7;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 48px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 84% 16%, rgba(134, 239, 172, 0.36), transparent 28%),
    linear-gradient(135deg, #fffbeb, #f7fee7);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  min-height: 260px;
}

.category-hero {
  min-height: 320px;
}

.filter-bar {
  display: flex;
  margin-bottom: 22px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 41, 55, 0.07);
}

.inline-filter {
  min-height: 42px;
}

.search-page-form {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-page-form input {
  padding: 0 14px;
}

.search-result-title {
  margin: 22px 0;
  color: #4b5563;
  font-weight: 800;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-weight: 700;
}

.breadcrumb a {
  color: #854d0e;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 90% 12%, rgba(250, 204, 21, 0.26), transparent 32%),
    linear-gradient(135deg, #ffffff, #f7fee7);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(31, 41, 55, 0.18);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.meta-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.meta-grid b {
  color: #9ca3af;
  font-size: 12px;
}

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

.player-section,
.detail-content {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  pointer-events: auto;
}

.play-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  font-size: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.video-shell.playing .play-layer {
  opacity: 0;
  pointer-events: none;
}

.play-layer:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

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

.detail-content article,
.side-links {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.detail-content article {
  padding: 30px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-content h2:not(:first-child) {
  margin-top: 28px;
}

.detail-content p {
  margin: 0;
  color: #4b5563;
  line-height: 1.95;
  font-size: 17px;
}

.side-links {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.side-links a {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

.related-section {
  margin-bottom: 70px;
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

  .featured-grid,
  .movie-grid,
  .all-movies {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    order: -1;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .header-inner {
    gap: 10px;
  }

  .hero-wrap,
  .page-hero,
  .detail-hero {
    border-radius: 26px;
    padding: 22px;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-copy {
    padding: 18px;
  }

  .hero-poster {
    width: min(360px, 100%);
    margin: 0 auto;
  }

  .hero-controls {
    left: 20px;
    bottom: 20px;
  }

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

  .detail-poster {
    width: min(360px, 100%);
    margin: 0 auto;
  }

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

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

@media (max-width: 560px) {
  .brand-name {
    font-size: 18px;
  }

  .content-section,
  .hero-wrap,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-content,
  .breadcrumb {
    width: min(100% - 20px, 1180px);
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-info .lead {
    font-size: 16px;
  }

  .hero-slider {
    min-height: 710px;
  }

  .category-grid,
  .category-grid.wide,
  .featured-grid,
  .movie-grid,
  .movie-grid.compact,
  .all-movies {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 34px 48px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

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