:root {
  --bg: #fff8ed;
  --surface: #ffffff;
  --surface-soft: #fffbeb;
  --ink: #24140a;
  --muted: #6b4f3f;
  --line: rgba(146, 64, 14, 0.18);
  --primary: #92400e;
  --primary-dark: #78350f;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --shadow: 0 18px 50px rgba(120, 53, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 38%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.68;
}

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

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

p,
h1,
h2,
h3 {
  margin: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(154, 52, 18, 0.96), rgba(120, 53, 15, 0.96));
  color: #fff7ed;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 36px rgba(69, 26, 3, 0.25);
  backdrop-filter: blur(10px);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #78350f;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 24px rgba(245, 158, 11, 0.28);
}

.logo-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.logo-text span {
  display: block;
  font-size: 12px;
  color: rgba(255, 251, 235, 0.72);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 251, 235, 0.88);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #78350f;
  background: #fde68a;
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 74vh;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(69, 26, 3, 0.92), rgba(146, 64, 14, 0.82) 42%, rgba(17, 24, 39, 0.86)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.68), transparent 24rem),
    radial-gradient(circle at 20% 70%, rgba(251, 191, 36, 0.35), transparent 18rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  right: -180px;
  top: -120px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.22);
  filter: blur(8px);
}

.hero::after {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 80%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 74vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fef3c7;
  border: 1px solid rgba(254, 243, 199, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  font-weight: 900;
  text-wrap: balance;
}

.hero-lead {
  margin-top: 20px;
  max-width: 720px;
  color: rgba(255, 247, 237, 0.86);
  font-size: 18px;
}

.hero-actions,
.card-actions,
.detail-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: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  color: #fff7ed;
  border: 1px solid rgba(255, 247, 237, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.hero-panel {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(254, 243, 199, 0.26);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.hero-feature-card {
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
}

.hero-feature-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-feature-body {
  padding: 20px;
}

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

.hero-feature-body .meta-row {
  color: rgba(255, 247, 237, 0.72);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #78350f;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 900;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: rgba(255, 251, 235, 0.72);
}

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

.section-title {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--muted);
  max-width: 680px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.player-panel,
.search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 58px rgba(120, 53, 15, 0.22);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #451a03;
}

.movie-card img,
.rank-poster,
.related-card img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card img {
  aspect-ratio: 3 / 4;
}

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

.card-rating {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #451a03;
  background: #fde68a;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 18px;
  line-height: 1.25;
  min-height: 2.5em;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card {
  display: block;
  padding: 24px;
  min-height: 176px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.82)),
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.32), transparent 10rem);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(120, 53, 15, 0.2);
}

.category-card strong {
  display: block;
  font-size: 21px;
  font-weight: 900;
}

.category-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.rank-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  align-items: center;
}

.rank-number {
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
  font-weight: 900;
}

.rank-poster {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.page-hero {
  padding: 64px 0 42px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(69, 26, 3, 0.94), rgba(146, 64, 14, 0.9)),
    radial-gradient(circle at 80% 30%, rgba(251, 191, 36, 0.36), transparent 24rem);
}

.page-hero h1 {
  max-width: 980px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  margin-top: 12px;
  max-width: 760px;
  color: rgba(255, 247, 237, 0.82);
  font-size: 17px;
}

.search-panel {
  padding: 16px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}

.search-panel input,
.search-panel select {
  min-height: 46px;
  width: 100%;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.detail-poster {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.detail-panel {
  padding: 28px;
}

.detail-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  color: #78350f;
  background: #fffbeb;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.article-block p {
  color: #3f2a1d;
  font-size: 16px;
}

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

.related-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.1);
}

.related-card img {
  aspect-ratio: 3 / 4;
}

.related-card span {
  display: block;
  padding: 10px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.25;
}

.player-panel {
  overflow: hidden;
  background: #111827;
}

.video-shell {
  position: relative;
  background: #050505;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.player-info {
  padding: 24px;
  color: #fff7ed;
}

.player-info p {
  color: rgba(255, 247, 237, 0.78);
}

.notice-line {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #451a03;
  background: #fde68a;
  font-weight: 800;
}

.site-footer {
  padding: 42px 0;
  color: #fffbeb;
  background: linear-gradient(90deg, #451a03, #78350f, #451a03);
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 251, 235, 0.78);
}

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

.empty-result {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #fffbeb;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 247, 237, 0.72);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 720px) {
  .nav-inner {
    min-height: 72px;
    height: auto;
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-inner {
    padding: 44px 0;
  }

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

  .rank-card {
    grid-template-columns: 80px minmax(0, 1fr);
  }

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

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

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
