:root {
  --bg: #fffaf0;
  --bg-soft: #fff7ed;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(217, 119, 6, 0.16);
  --brand: #dc2626;
  --brand-2: #f97316;
  --amber: #d97706;
  --amber-light: #f59e0b;
  --shadow: 0 24px 60px rgba(120, 53, 15, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 32rem),
    linear-gradient(135deg, rgba(255, 251, 235, 0.92), #ffffff 48%, rgba(254, 252, 232, 0.88));
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: 0 10px 34px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 26px rgba(220, 38, 38, 0.25);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #4b5563;
  font-weight: 700;
}

.desktop-nav a {
  position: relative;
  padding: 28px 0;
  transition: color 0.25s ease;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 22px;
  left: 0;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.desktop-nav a:hover {
  color: var(--amber);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(300px, 32vw);
  padding: 4px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-search input,
.mobile-panel input,
.local-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  flex: 1;
  padding: 10px 12px;
}

.header-search button,
.mobile-panel button,
.local-search button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  cursor: pointer;
}

.header-search button {
  padding: 9px 15px;
  border-radius: 999px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.1);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #78350f;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 16px;
  color: #4b5563;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  background: #fff7ed;
}

.mobile-panel button {
  padding: 0 16px;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 22px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 548px;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 58px;
  opacity: 0;
  visibility: hidden;
  background-color: #111827;
  background-position: center;
  background-size: cover;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-content {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.poster-badge,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.hero-kicker {
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 690px;
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.78;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.3);
}

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

.btn-soft {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fbbf24;
}

.section {
  padding: 46px 0;
}

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

.section-head h2,
.page-title,
.detail-title {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-head p,
.page-hero p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.view-more {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  font-weight: 900;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 38px rgba(120, 53, 15, 0.09);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(120, 53, 15, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  min-height: 285px;
  background-color: #1f2937;
  background-position: center;
  background-size: cover;
}

.compact-card .movie-poster {
  min-height: 210px;
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 78px);
  padding: 6px 10px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.poster-score {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #78350f;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
}

.movie-info {
  display: flex;
  min-height: 184px;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
}

.movie-info strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #111827;
  font-size: 18px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.movie-genre,
.movie-desc {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 38px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.movie-tags em {
  padding: 5px 9px;
  border-radius: 999px;
  color: #92400e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  background: #fffbeb;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.3), transparent 52%),
    linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: 0 18px 40px rgba(120, 53, 15, 0.1);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(120, 53, 15, 0.16);
}

.category-tile strong {
  display: block;
  color: #111827;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.category-tile span {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: var(--amber);
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 24px;
}

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

.rank-panel,
.info-panel,
.player-card,
.detail-content {
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 42px rgba(120, 53, 15, 0.1);
}

.rank-panel {
  padding: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  transition: background 0.24s ease, transform 0.24s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.rank-number {
  color: #b45309;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.rank-thumb {
  display: block;
  height: 78px;
  border-radius: 16px;
  background-color: #111827;
  background-position: center;
  background-size: cover;
}

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

.rank-body strong {
  display: block;
  overflow: hidden;
  color: #111827;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-body small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  padding: 7px 10px;
  border-radius: 999px;
  color: #92400e;
  font-weight: 950;
  background: #fffbeb;
}

.info-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 106px;
}

.info-panel h2,
.detail-content h2,
.player-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.info-panel p,
.detail-content p {
  color: var(--muted);
  line-height: 1.82;
}

.page-hero {
  padding: 54px 0 26px;
}

.page-title {
  font-size: clamp(36px, 5vw, 64px);
}

.local-tools {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
}

.local-search {
  display: flex;
  overflow: hidden;
  max-width: 680px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
}

.local-search input {
  flex: 1;
  padding: 15px 18px;
}

.local-search button {
  padding: 0 24px;
}

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

.filter-bar button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #92400e;
  font-weight: 850;
  background: #fff7ed;
  cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
}

.no-results.show {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #b45309;
  font-weight: 800;
}

.detail-hero {
  margin-top: 22px;
  overflow: hidden;
  border-radius: 32px;
  color: #ffffff;
  background-color: #111827;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.detail-hero-inner {
  display: grid;
  min-height: 480px;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: end;
  gap: 34px;
  padding: 46px;
}

.detail-poster {
  align-self: stretch;
  min-height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background-color: #1f2937;
  background-position: center;
  background-size: cover;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.detail-title {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-summary {
  margin: 16px 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 34px 0 54px;
}

.player-card,
.detail-content {
  padding: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
}

.play-layer span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #78350f;
  font-size: 30px;
  background: #fbbf24;
  box-shadow: 0 18px 42px rgba(251, 191, 36, 0.34);
}

.play-layer strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.player-frame.is-playing .play-layer {
  display: none;
}

.detail-content {
  margin-top: 24px;
}

.detail-content + .detail-content {
  margin-top: 24px;
}

.detail-content p + p {
  margin-top: 14px;
}

.side-card {
  position: sticky;
  top: 106px;
}

.side-card .rank-panel {
  padding: 14px;
}

.side-card .rank-item {
  grid-template-columns: 36px 58px minmax(0, 1fr);
}

.side-card .rank-score {
  display: none;
}

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

.site-footer {
  margin-top: 34px;
  padding: 44px 0 22px;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94), rgba(255, 255, 255, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

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

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-links a {
  color: #6b7280;
  font-weight: 700;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 16px;
  }

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

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

  .info-panel,
  .side-card {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .header-inner {
    min-height: 68px;
  }

  .hero-shell {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 30px 22px 72px;
  }

  .hero-dots {
    right: auto;
    left: 22px;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 26px;
  }

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

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

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero h1,
  .detail-title,
  .page-title {
    letter-spacing: -0.04em;
  }

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

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

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

  .rank-score {
    display: none;
  }

  .local-search {
    border-radius: 22px;
  }

  .local-search button {
    padding: 0 16px;
  }
}
