:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --orange: #f97316;
  --amber: #f59e0b;
  --gold: #facc15;
  --text: #111827;
  --muted: #6b7280;
  --panel: #ffffff;
  --soft: #fff7ed;
  --line: #e5e7eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.28);
}

.header-inner,
.strip-inner,
.footer-inner,
.page-shell,
.detail-shell,
.intro-panel,
.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

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

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

.brand-text small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.header-search {
  flex: 1;
  display: flex;
  max-width: 460px;
  min-width: 220px;
}

.header-search input,
.inline-search input,
.toolbar-panel input,
.toolbar-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
  color: white;
  background: rgba(51, 65, 85, 0.86);
  border-radius: 999px 0 0 999px;
  padding: 12px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.inline-search input:focus,
.toolbar-panel input:focus,
.toolbar-panel select:focus {
  border-color: rgba(249, 115, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.inline-search button {
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 0 999px 999px 0;
  padding: 0 20px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #d1d5db;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fb923c;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.category-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.75);
}

.strip-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 42px;
  overflow-x: auto;
  scrollbar-width: none;
}

.strip-inner a {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 14px;
}

.strip-inner a:hover {
  color: #fb923c;
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.32), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.42) 58%, rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  bottom: 88px;
  width: min(680px, calc(100% - 48px));
  color: white;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-content p,
.page-hero p,
.detail-line {
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.meta-line,
.tag-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.section-more {
  color: white;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  padding: 12px 22px;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.24);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  padding: 11px 22px;
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 32px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 30px;
}

.intro-panel h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.intro-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.inline-search {
  display: flex;
}

.inline-search input {
  color: var(--text);
  background: white;
}

.content-section {
  margin-top: 56px;
  margin-bottom: 56px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.movie-card,
.wide-card,
.category-card,
.story-card,
.ranking-row,
.category-overview {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-900);
}

.poster-link img,
.wide-thumb img,
.ranking-thumb img,
.category-card img,
.rank-mini img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.score-badge,
.play-badge {
  position: absolute;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  font-size: 12px;
}

.score-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.74);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.card-body {
  padding: 16px;
}

.card-title,
.wide-title,
.ranking-title {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-title:hover,
.wide-title:hover,
.ranking-title:hover {
  color: var(--orange);
}

.card-body p,
.wide-info p,
.ranking-info p {
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  color: #64748b;
  font-size: 13px;
}

.meta-line span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
  margin-left: 10px;
}

.tag-line {
  margin-top: 12px;
}

.tag-line span {
  color: #9a3412;
  background: #ffedd5;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 18px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: end;
  isolation: isolate;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.24));
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #e5e7eb;
  line-height: 1.6;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: stretch;
}

.wide-thumb {
  display: block;
  min-height: 130px;
  background: var(--slate-900);
}

.wide-info {
  padding: 16px;
}

.dark-section {
  color: white;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--slate-900), #020617);
  padding: 34px;
}

.dark-section .section-heading p,
.dark-section .meta-line,
.dark-section .rank-mini em {
  color: #cbd5e1;
}

.dark-section .section-heading h2 {
  color: white;
}

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

.rank-mini {
  display: grid;
  grid-template-columns: 88px auto;
  grid-template-areas: "img title" "img text";
  gap: 4px 14px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-mini:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.18);
}

.rank-mini img {
  grid-area: img;
  aspect-ratio: 1;
  border-radius: 14px;
}

.rank-mini span {
  color: var(--gold);
  font-weight: 900;
}

.rank-mini strong {
  color: white;
}

.rank-mini em {
  font-style: normal;
  font-size: 13px;
}

.page-shell {
  padding: 42px 0 64px;
}

.page-hero {
  border-radius: var(--radius);
  color: white;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.38), transparent 25%),
    linear-gradient(135deg, var(--slate-900), #020617);
  padding: clamp(36px, 6vw, 70px);
  margin-bottom: 34px;
  box-shadow: var(--shadow);
}

.small-hero p,
.category-hero p,
.ranking-hero p,
.search-hero p {
  max-width: 760px;
}

.category-overview {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: 22px;
  align-items: center;
  padding: 24px;
  margin-bottom: 22px;
}

.category-copy h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-copy p {
  color: var(--muted);
  line-height: 1.8;
}

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

.compact-card .card-body p {
  -webkit-line-clamp: 1;
}

.toolbar-panel {
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 16px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 30px;
}

.toolbar-panel input,
.toolbar-panel select {
  color: var(--text);
  background: #f8fafc;
  border-radius: 999px;
}

.plain-section {
  width: 100%;
  margin-top: 0;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 62px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: white;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.ranking-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: var(--slate-900);
}

.detail-shell {
  padding: 28px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  margin: 8px 0 22px;
}

.breadcrumb a:hover {
  color: var(--orange);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: stretch;
}

.player-box {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  color: white;
  padding: 0;
  background: #000;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.22));
}

.play-circle {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.4);
  font-size: 30px;
}

.player-box.is-playing .player-cover {
  display: none;
}

.detail-info {
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(135deg, var(--slate-900), #020617);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.detail-meta {
  margin: 18px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 26px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.meta-card {
  grid-column: 1 / -1;
}

.meta-card dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-card div {
  border-radius: 16px;
  background: var(--soft);
  padding: 16px;
}

.meta-card dt {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.meta-card dd {
  margin: 8px 0 0;
  font-weight: 800;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand strong {
  color: #fb923c;
  font-size: 22px;
}

.footer-brand p {
  line-height: 1.8;
  max-width: 480px;
}

.footer-links {
  display: flex;
  align-content: start;
  justify-content: end;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-links a:hover {
  color: #fb923c;
}

.is-hidden {
  display: none !important;
}

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

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

  .detail-hero,
  .category-overview,
  .detail-content,
  .footer-inner,
  .intro-panel {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .hero-content {
    bottom: 92px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .wide-card,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .wide-thumb,
  .ranking-thumb {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

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

  .meta-card dl {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: start;
  }
}
