:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --surface-soft: #fff4e5;
  --ink: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #f0dfca;
  --accent: #ff9f24;
  --accent-strong: #f58700;
  --accent-soft: #ffe4b8;
  --shadow: 0 20px 50px rgba(37, 21, 3, 0.12);
  --radius: 24px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 159, 36, 0.18), transparent 30rem),
    linear-gradient(180deg, #fff8ed 0%, #ffffff 42%, #fffaf3 100%);
}

body.locked {
  overflow: hidden;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 179, 71, 0.26);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 30px rgba(245, 135, 0, 0.32);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 10px;
  color: #374151;
  font-weight: 700;
}

.desktop-nav a {
  position: relative;
  padding: 8px 2px;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent-strong);
}

.desktop-nav a.active::after,
.desktop-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-search {
  margin-left: auto;
  flex: 0 1 340px;
}

.nav-search form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(255, 159, 36, 0.08);
}

.nav-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  padding: 12px 14px;
  font-size: 14px;
  background: transparent;
}

.nav-search button,
.primary-button,
.secondary-button,
.hero-search button,
.filter-panel button,
.player-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(245, 135, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  padding: 0 18px;
}

.primary-button,
.secondary-button,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
}

.secondary-button {
  color: var(--accent-strong);
  background: #ffffff;
  border: 1px solid var(--accent-soft);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.hero-search button:hover,
.filter-panel button:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(245, 135, 0, 0.32);
}

.menu-button {
  display: none;
  border: 0;
  background: var(--surface-soft);
  color: var(--accent-strong);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.mobile-panel a {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  background: #fff8ef;
  font-weight: 700;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
  min-height: 640px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 22%, rgba(255, 159, 36, 0.35), transparent 24rem),
    linear-gradient(110deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.66) 42%, rgba(0, 0, 0, 0.22) 100%);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.02);
  transform: scale(1.04);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 44px;
  padding: 82px 0 52px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  color: #ffe7c7;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 780px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  max-width: 680px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
}

.hero-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: #ffffff;
  background: transparent;
  font-size: 16px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.64);
}

.hero-search button {
  flex: 0 0 auto;
  padding: 0 24px;
}

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

.hero-mini-grid {
  display: grid;
  gap: 16px;
}

.hero-feature-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.hero-feature-card img {
  width: 110px;
  height: 152px;
  border-radius: 18px;
  object-fit: cover;
}

.hero-feature-card h2,
.hero-feature-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.hero-feature-card p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

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

.hero-dots button {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--accent);
}

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

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

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 159, 36, 0.16), rgba(255, 255, 255, 0.86)),
    #ffffff;
  box-shadow: var(--shadow);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.stat-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #8a4b00;
  background: #fff1dc;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 179, 71, 0.32);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(27, 16, 0, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 135, 0, 0.58);
  box-shadow: 0 22px 48px rgba(27, 16, 0, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1f2937;
}

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

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

.play-dot,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 42px;
  height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

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

.movie-card h3 {
  min-height: 2.8em;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--accent-strong);
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.6em;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #924f00;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff2df;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #6b7280;
  background: #f8fafc;
  font-size: 12px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% 15%, rgba(255, 255, 255, 0.46), transparent 38%),
    linear-gradient(135deg, #ffb347, #ff8f00);
  color: #ffffff;
  box-shadow: 0 22px 46px rgba(245, 135, 0, 0.22);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 120px;
  height: 120px;
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(25deg);
}

.category-card strong {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
}

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #8a4b00;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(27, 16, 0, 0.07);
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 13px 14px;
  background: #fffaf3;
  font-size: 15px;
}

.filter-panel button {
  min-width: 110px;
  padding: 0 18px;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background: #000000;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) saturate(1.15);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 159, 36, 0.3), transparent 30rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  padding: 54px 0;
}

.detail-poster img {
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-info .one-line {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

.info-item {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.info-item span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  margin-bottom: 4px;
}

.info-item strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-section,
.text-section {
  width: min(1180px, calc(100% - 32px));
  margin: 44px auto;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #060606;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.22)),
    var(--poster-bg, #111827);
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-box.playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-panel {
  width: min(560px, calc(100% - 32px));
  text-align: center;
  color: #ffffff;
}

.player-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 42px);
}

.player-panel p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.text-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.article-panel,
.aside-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(27, 16, 0, 0.07);
}

.article-panel h2,
.aside-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-panel p {
  color: #374151;
  line-height: 1.95;
  margin: 0 0 18px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff8ef;
  transition: transform 0.2s ease, background 0.2s ease;
}

.related-list a:hover {
  transform: translateX(4px);
  background: #ffeed5;
}

.related-list img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.related-list strong {
  display: block;
  margin-bottom: 4px;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(27, 16, 0, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 900;
}

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

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.notice-box {
  padding: 22px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
  position: sticky;
  top: 94px;
}

.notice-box p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

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

body.has-empty-result .empty-tip {
  display: block;
}

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

  .hero-content,
  .detail-wrap,
  .text-section,
  .rank-layout {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-content {
    min-height: 720px;
    padding-top: 64px;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    min-height: 64px;
  }

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

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-search {
    display: grid;
    border-radius: 22px;
  }

  .hero-search input {
    min-height: 46px;
  }

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

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

  .movie-card p {
    min-height: 3.2em;
    -webkit-line-clamp: 2;
  }

  .page-title,
  .article-panel,
  .aside-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-wrap {
    padding: 36px 0;
  }

  .detail-poster {
    max-width: 240px;
  }
}
