:root {
  --color-primary: #facc15;
  --color-primary-dark: #f59e0b;
  --color-orange: #fb923c;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-soft: #fef9c3;
  --color-card: #ffffff;
  --color-page: #fff7ed;
  --shadow-card: 0 14px 35px rgba(17, 24, 39, 0.10);
  --shadow-strong: 0 28px 70px rgba(17, 24, 39, 0.22);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

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(--color-text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 38%, #f9fafb 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #facc15 0%, #fb923c 50%, #eab308 100%);
  box-shadow: 0 10px 30px rgba(180, 83, 9, 0.22);
}

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

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

.brand {
  color: #ffffff;
  font-size: clamp(20px, 3vw, 28px);
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #111827;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: #ffffff;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
  cursor: pointer;
}

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

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

.mobile-nav a {
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
}

.home-page,
.page-shell {
  padding-bottom: 56px;
}

.hero-carousel {
  padding: 28px 0 8px;
}

.hero-stage {
  position: relative;
  height: min(600px, 68vh);
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.55s ease, transform 0.75s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.53) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(660px, calc(100% - 52px));
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: clamp(24px, 6vw, 64px);
  color: #ffffff;
}

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 24px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.3vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  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) scale(1.02);
}

.btn-primary {
  background: var(--color-primary);
  color: #111827;
  box-shadow: 0 14px 28px rgba(250, 204, 21, 0.24);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn-dark {
  background: rgba(17, 24, 39, 0.76);
  color: #ffffff;
}

.full-btn {
  width: 100%;
  margin-top: 18px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.07);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.quick-search-section,
.section-block,
.detail-main-card,
.detail-side-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(251, 191, 36, 0.14);
}

.quick-search-section {
  margin-top: 28px;
  padding: 24px;
}

.quick-search,
.filter-search {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-search input {
  width: 100%;
  min-height: 52px;
  border: 2px solid #fde68a;
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.filter-search input:focus {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

.quick-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  background: #111827;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  font-weight: 800;
}

.section-block {
  margin-top: 36px;
  padding: clamp(22px, 4vw, 36px);
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-heading a {
  color: #b45309;
  font-weight: 900;
  white-space: nowrap;
}

.compact-heading {
  align-items: start;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 42px rgba(17, 24, 39, 0.18);
}

.movie-poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #facc15, #fb923c 55%, #111827);
}

.poster-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #facc15, #fb923c 55%, #111827);
}

.poster-frame::after {
  content: attr(data-title);
  position: absolute;
  inset: auto 14px 14px 14px;
  display: none;
  color: #ffffff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.poster-frame.poster-empty::after {
  display: block;
}

.poster-image,
.movie-poster-wrap img,
.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.badge-top {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #111827;
  background: var(--color-primary);
}

.rank-mark {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

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

.movie-card h3,
.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.ranking-item:hover h3 {
  color: #b45309;
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
}

.meta-row span + span::before {
  content: "·";
  margin-right: 8px;
  color: #d1d5db;
}

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

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
  scroll-snap-align: start;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
}

.split-section .section-block {
  margin-top: 36px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 52px 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(5px);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

.ranking-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: var(--color-primary);
  font-weight: 900;
}

.ranking-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

.compact-ranking .ranking-info p {
  min-height: auto;
}

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7 0%, #fdba74 45%, #facc15 100%);
  box-shadow: 0 16px 32px rgba(180, 83, 9, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px rgba(180, 83, 9, 0.2);
}

.category-tile strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-tile span {
  color: rgba(17, 24, 39, 0.72);
  font-size: 14px;
}

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

.page-hero {
  margin-top: 28px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(250, 204, 21, 0.86), transparent 35%), linear-gradient(135deg, #111827 0%, #78350f 100%);
  box-shadow: var(--shadow-strong);
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

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

.filter-area {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

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

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #92400e;
  background: #fff7ed;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #111827;
  background: var(--color-primary);
  transform: translateY(-1px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--color-muted);
  font-weight: 700;
}

.breadcrumb a {
  color: #b45309;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 18px;
}

.detail-main-card,
.detail-side-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(250, 204, 21, 0.18), rgba(0, 0, 0, 0.72) 58%, rgba(0, 0, 0, 0.86));
}

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

.play-circle {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  color: #111827;
  background: var(--color-primary);
  box-shadow: 0 18px 45px rgba(250, 204, 21, 0.28);
  font-size: 32px;
}

.player-cover strong {
  max-width: min(90%, 720px);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.15;
}

.player-cover em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.detail-content {
  padding: clamp(22px, 4vw, 36px);
}

.detail-badges,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-badges span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.detail-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.lead-text {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
}

.detail-content section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #f3f4f6;
}

.detail-content h2,
.detail-side-card h2,
.site-footer h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-content p {
  margin: 0;
  color: #374151;
}

.detail-side-card {
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 92px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  margin-bottom: 18px;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-card dl div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.detail-side-card dt {
  color: var(--color-muted);
  font-weight: 800;
}

.detail-side-card dd {
  margin: 0;
  font-weight: 700;
}

.site-footer {
  margin-top: 56px;
  color: #ffffff;
  background: linear-gradient(180deg, #111827 0%, #000000 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 24px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #d1d5db;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
}

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

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

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

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

  .detail-side-card {
    position: static;
  }
}

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

  .hero-stage {
    min-height: 540px;
    height: 72vh;
  }

  .hero-content {
    width: calc(100% - 28px);
    padding: 0 22px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search,
  .filter-search {
    flex-direction: column;
  }

  .quick-search button {
    min-height: 48px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 42px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-info p {
    display: none;
  }

  .detail-side-card dl div {
    grid-template-columns: 62px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 20px;
  }

  .hero-stage {
    border-radius: 18px;
    min-height: 500px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-actions {
    display: grid;
  }

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

  .horizontal-row {
    grid-auto-columns: minmax(220px, 80vw);
  }

  .play-circle {
    width: 66px;
    height: 66px;
  }
}
