:root {
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --card: #ffffff;
  --text: #451a03;
  --muted: #92400e;
  --line: #fde68a;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-light: #fef3c7;
  --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96), rgba(254, 243, 199, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-light);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.home-search-panel input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #fcd34d;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  outline: none;
}

.header-search input {
  width: 230px;
  padding: 9px 14px;
}

.header-search button,
.home-search-panel button,
.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(217, 119, 6, 0.2);
}

.header-search button:hover,
.home-search-panel button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.28);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--brand-dark);
  background: var(--brand-light);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-cats {
  margin-top: 12px;
}

.mobile-cats a {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #1c0a03;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.03);
}

.hero-shade {
  background:
    radial-gradient(circle at 75% 35%, rgba(245, 158, 11, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(28, 10, 3, 0.94) 0%, rgba(28, 10, 3, 0.74) 44%, rgba(28, 10, 3, 0.2) 100%),
    linear-gradient(0deg, rgba(28, 10, 3, 0.85), transparent 42%);
}

.hero-content {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 118px;
  max-width: 760px;
  color: #fff;
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  color: #fbbf24;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 16px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #ffedd5;
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.16);
  color: #ffedd5;
  border: 1px solid rgba(253, 230, 138, 0.25);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span {
  color: var(--brand-dark);
  background: var(--brand-light);
  border-color: var(--line);
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(253, 230, 138, 0.75);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
}

.detail-info .ghost-button {
  color: var(--brand-dark);
  background: #fff7ed;
  border-color: var(--line);
}

.hero-poster {
  position: absolute;
  right: max(32px, calc((100vw - 1240px) / 2));
  bottom: 80px;
  width: min(330px, 26vw);
  aspect-ratio: 3 / 4;
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2));
  top: 50%;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-controls button {
  width: 44px;
  height: 44px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

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

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

.home-search-panel,
.content-section,
.category-list-wrap,
.ranking-wrap,
.detail-content,
.player-section,
.filter-bar {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 540px);
  gap: 24px;
  align-items: center;
}

.home-search-panel h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 32px);
}

.home-search-panel form {
  display: flex;
  gap: 10px;
}

.home-search-panel input {
  min-width: 0;
  flex: 1;
  padding: 13px 16px;
}

.content-section {
  padding: 56px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  margin: 0;
  line-height: 1.15;
}

.section-heading h2 {
  font-size: clamp(26px, 3.5vw, 42px);
}

.section-heading p,
.page-hero p,
.category-block p,
.movie-card p,
.detail-one-line,
.detail-content p {
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(253, 230, 138, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fde68a;
}

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-meta a,
.card-meta span,
.detail-meta span,
.ranking-meta span,
.ranking-meta strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-light);
}

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

.movie-card h3 a:hover,
.compact-card:hover span,
.ranking-card h2 a:hover {
  color: var(--brand);
}

.movie-card p {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 10, 3, 0.86), rgba(28, 10, 3, 0.18));
}

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 58px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: #ffedd5;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.08);
}

.rank-item strong {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 14px;
  padding: 8px 0;
  text-align: center;
}

.rank-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-item em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 52px;
  color: #fff;
  background:
    radial-gradient(circle at 76% 22%, rgba(253, 230, 138, 0.32), transparent 30%),
    linear-gradient(135deg, #78350f, #b45309 52%, #92400e);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
}

.category-list-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 44px;
}

.category-block {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
}

.category-block h2 {
  margin: 0 0 8px;
}

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

.compact-card {
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: 16px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.compact-card span,
.compact-card small {
  display: block;
  padding: 8px 10px 0;
}

.compact-card span {
  font-size: 14px;
  font-weight: 800;
}

.compact-card small {
  padding-bottom: 10px;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 180px 200px;
  gap: 12px;
  padding-top: 32px;
}

.filter-bar input,
.filter-bar select {
  padding: 12px 14px;
}

.list-section {
  padding-top: 26px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
}

.ranking-card h2 {
  margin: 2px 0 8px;
  font-size: 20px;
}

.ranking-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #1c0a03;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 10, 3, 0.95), rgba(28, 10, 3, 0.5)), linear-gradient(0deg, #1c0a03, transparent 50%);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.15);
  transform: scale(1.04);
}

.detail-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 58px;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #fed7aa;
  font-size: 14px;
}

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

.detail-main {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 34px;
  align-items: end;
  padding-top: 34px;
}

.detail-poster {
  display: block;
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 66px);
}

.detail-one-line {
  max-width: 850px;
  color: #ffedd5;
  font-size: 19px;
}

.detail-meta,
.detail-info .tag-row {
  margin: 18px 0;
}

.detail-info .tag-row span {
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(253, 230, 138, 0.28);
}

.player-section {
  padding-top: 38px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(69, 26, 3, 0.26);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.26));
  border: 0;
  cursor: pointer;
  text-align: center;
}

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

.play-ring {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: var(--brand-dark);
  background: #fff;
  border-radius: 50%;
  font-size: 32px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  width: min(92%, 760px);
  font-size: clamp(22px, 4vw, 42px);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 42px;
}

.detail-content article,
.prev-next {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
}

.detail-content p {
  margin-bottom: 0;
  white-space: pre-line;
}

.prev-next {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
}

.prev-next a {
  color: var(--brand-dark);
  font-weight: 900;
}

.related-section {
  padding-bottom: 58px;
}

.site-footer {
  margin-top: 62px;
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 420px;
  color: var(--muted);
}

.footer-column h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li {
  margin: 8px 0;
}

.footer-column a {
  color: var(--muted);
}

.footer-column a:hover {
  color: var(--brand-dark);
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

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

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

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

  .hero-poster {
    opacity: 0.8;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-content {
    padding-top: 98px;
  }

  .hero-poster {
    display: none;
  }

  .home-search-panel {
    grid-template-columns: 1fr;
  }

  .home-search-panel form {
    flex-direction: column;
  }

  .movie-grid,
  .category-list-wrap,
  .ranking-wrap,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .detail-poster {
    width: min(260px, 70vw);
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 20px, 1240px);
  }

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

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

  .hero-content,
  .home-search-panel,
  .content-section,
  .category-list-wrap,
  .ranking-wrap,
  .detail-content,
  .player-section,
  .filter-bar,
  .detail-inner,
  .page-hero {
    width: calc(100% - 20px);
  }

  .page-hero,
  .home-search-panel,
  .category-block,
  .detail-content article,
  .prev-next {
    padding: 22px;
  }

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

  .ranking-card {
    grid-template-columns: 110px 1fr;
  }
}
