:root {
  --bg: #fff7ed;
  --panel: #ffffff;
  --panel-soft: #fffbeb;
  --text: #28170a;
  --muted: #7c5b36;
  --line: #fde68a;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #f59e0b;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fffaf0 45%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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;
  border-bottom: 1px solid rgba(253, 230, 138, 0.9);
  background: rgba(255, 251, 235, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell,
.footer-shell,
.section-shell,
.hero-content,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--brand-dark);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  color: #6b3f12;
  font-weight: 700;
}

.desktop-nav a {
  padding: 10px 0;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.top-search {
  display: flex;
  align-items: center;
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.08);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  color: var(--text);
}

.top-search button,
.primary-btn,
.secondary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.top-search button {
  margin-right: 4px;
  padding: 8px 15px;
  color: #ffffff;
  background: var(--brand);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 12px;
  font-weight: 800;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(31, 19, 8, 0.92));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 36px;
  align-items: center;
  padding: 92px 0 82px;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 14px 28px rgba(180, 83, 9, 0.35);
}

.secondary-btn {
  color: #78350f;
  background: #ffffff;
}

.ghost-btn {
  color: var(--brand-dark);
  border: 1px solid var(--line);
  background: #fff7ed;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
}

.hero-panel {
  padding: 24px;
  border: 1px solid rgba(253, 230, 138, 0.34);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.hero-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.hero-mini a {
  padding: 12px;
  border-radius: 16px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-controls button,
.hero-dot {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
}

.hero-dot.is-active {
  background: #f59e0b;
}

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

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

.section-heading h2,
.filter-panel h2,
.detail-block h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.category-card p,
.detail-block p,
.movie-info p {
  color: var(--muted);
  line-height: 1.7;
}

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #fffbeb);
  box-shadow: 0 12px 32px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 22px;
}

.category-card p {
  margin: 12px 0 18px;
}

.category-card span {
  display: inline-flex;
  color: var(--brand);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fde68a, #fef3c7);
}

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

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  color: #3b220a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--brand);
}

.movie-info p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  margin: 10px 0 0;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-meta span,
.tag-list span,
.detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.page-hero {
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(120, 53, 15, 0.92), rgba(217, 119, 6, 0.82)),
    radial-gradient(circle at 80% 20%, rgba(253, 230, 138, 0.28), transparent 22rem);
}

.page-hero .section-shell {
  padding-top: 72px;
  padding-bottom: 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
}

.filter-panel .eyebrow {
  color: var(--brand);
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: #fffbeb;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

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

.detail-hero {
  padding: 46px 0;
  color: #ffffff;
  background:
    linear-gradient(100deg, rgba(31, 19, 8, 0.95), rgba(120, 53, 15, 0.86)),
    radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.38), transparent 26rem);
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-tag {
  color: #fffbeb;
  border-color: rgba(253, 230, 138, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding: 48px 0 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-core {
  display: grid;
  gap: 14px;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
}

.play-core span:first-child {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #78350f;
  background: #fcd34d;
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.45);
}

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

.detail-block,
.side-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
}

.detail-block + .detail-block {
  margin-top: 22px;
}

.detail-block p {
  margin: 16px 0 0;
  font-size: 17px;
}

.side-panel h2 {
  margin: 0 0 18px;
  color: var(--brand-dark);
  font-size: 24px;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffbeb;
}

.side-list img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.side-list strong {
  display: block;
  overflow: hidden;
  color: var(--brand-dark);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-list span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #fff7ed;
}

.footer-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .top-search {
    width: 240px;
  }

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

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

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

  .hero-panel,
  .detail-cover {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    padding-top: 54px;
    padding-bottom: 86px;
  }

  .hero-panel {
    padding: 16px;
  }

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

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

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

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

@media (max-width: 560px) {
  .nav-shell,
  .footer-shell,
  .section-shell,
  .hero-content,
  .detail-shell {
    width: min(100% - 22px, 1180px);
  }

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

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

  .rank-item {
    grid-template-columns: 44px 64px minmax(0, 1fr);
  }

  .rank-item img {
    width: 64px;
    height: 88px;
  }

  .detail-block,
  .side-panel,
  .filter-panel {
    padding: 18px;
  }
}
