:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --purple: #a855f7;
  --pink: #ec4899;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --bg: #f9fafb;
  --shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #fffbeb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(229, 231, 235, .95);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 8px 20px rgba(249, 115, 22, .35);
  font-size: 14px;
}

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

.nav-link {
  font-weight: 600;
  color: #374151;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.nav-link.subtle {
  color: #6b7280;
  font-size: 14px;
}

.top-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-width: 230px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}

.top-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  font-weight: 700;
  border-top: 1px solid #f3f4f6;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 38px;
  min-height: 560px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-track,
.hero-slide,
.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 7s ease;
}

.hero-slide.active .hero-media img {
  transform: scale(1.05);
}

.hero-fallback,
.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, .78);
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, .75), transparent 36%), linear-gradient(135deg, #111827, #7c2d12 48%, #f59e0b);
  font-weight: 800;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .48) 42%, rgba(0, 0, 0, .18)), linear-gradient(0deg, rgba(0, 0, 0, .72), transparent 52%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 76px);
  bottom: clamp(98px, 14vw, 138px);
  z-index: 3;
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, .94);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero-content p {
  margin: 0 0 18px;
  max-width: 650px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.card-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.tag-cloud span {
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.card-tags span,
.tag-cloud span {
  background: #fff7ed;
  color: var(--orange-dark);
}

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

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

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

.btn.primary {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 12px 28px rgba(249, 115, 22, .35);
}

.btn.primary:hover {
  background: var(--orange-dark);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .28);
}

.btn.text {
  color: #fff;
  background: transparent;
}

.hero-search-panel {
  position: absolute;
  left: clamp(24px, 7vw, 76px);
  right: clamp(24px, 7vw, 76px);
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  background: rgba(17, 24, 39, .62);
  backdrop-filter: blur(16px);
  color: #fff;
}

.hero-search-panel form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 540px;
}

.hero-search-panel input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  outline: none;
}

.hero-search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #fff;
  background: var(--orange);
  font-weight: 800;
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 118px;
  z-index: 6;
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 32px;
  background: #fff;
}

.category-strip,
.content-section,
.rank-entry,
.page-main,
.rank-board,
.article-section,
.player-section,
.overview-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.category-strip,
.content-section,
.rank-entry,
.rank-board,
.article-section,
.player-section,
.overview-grid {
  margin-bottom: 52px;
}

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

.section-head.compact {
  margin-bottom: 16px;
}

.section-head h2,
.article-section h2,
.player-section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

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

.section-more {
  color: var(--orange);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid rgba(249, 115, 22, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  padding: 20px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
}

.category-tile span,
.category-overview-card p {
  color: var(--muted);
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.poster-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .2s ease;
  z-index: 1;
}

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

.card-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(0, 0, 0, .65);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  min-height: 44px;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
}

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

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 13px;
}

.rank-entry {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  align-items: stretch;
  border-radius: 28px;
  padding: 32px;
  background: linear-gradient(135deg, #f97316, #f59e0b 48%, #ec4899);
  color: #fff;
  box-shadow: var(--shadow);
}

.rank-copy h2 {
  margin: 16px 0 12px;
  font-size: 38px;
}

.rank-copy p {
  color: rgba(255, 255, 255, .88);
}

.rank-list,
.rank-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-list a,
.rank-board-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
}

.rank-list span,
.rank-board-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--orange);
  font-weight: 900;
}

.rank-list strong,
.rank-board-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em,
.rank-board-list em,
.rank-board-list b {
  color: rgba(255, 255, 255, .82);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  padding: 32px 0 8px;
}

.page-hero,
.detail-hero {
  margin-bottom: 32px;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero.amber,
.detail-hero {
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.page-hero.blue {
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.page-hero.teal {
  background: linear-gradient(135deg, var(--teal), var(--purple));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, .78);
  font-weight: 700;
}

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

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255, 255, 255, .55);
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.page-hero p,
.detail-line {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 18px;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-panel input {
  min-width: min(420px, 100%);
}

.filter-panel select {
  min-width: 170px;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-board {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  box-shadow: var(--shadow);
}

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

.rank-board-list em {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
}

.detail-poster {
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
}

.detail-copy {
  min-width: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 700;
}

.detail-copy .tag-cloud span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.detail-copy .btn {
  margin-top: 24px;
}

.player-section,
.article-section {
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.video-box {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.main-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, .08), rgba(0, 0, 0, .66));
  cursor: pointer;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(249, 115, 22, .96);
  font-size: 32px;
  box-shadow: 0 14px 34px rgba(249, 115, 22, .32);
}

.video-box.is-playing .player-cover {
  opacity: 0;
  pointer-events: none;
}

.player-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  transition: opacity .2s ease;
}

.video-box:hover .player-bar,
.video-box.is-paused .player-bar {
  opacity: 1;
}

.player-bar button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(255, 255, 255, .17);
  font-weight: 800;
  cursor: pointer;
}

.player-bar button:hover {
  background: var(--orange);
}

.player-message {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: rgba(0, 0, 0, .86);
  text-align: center;
  font-weight: 800;
}

.video-box.has-error .player-message {
  display: flex;
}

.article-section h2 {
  margin-top: 0;
}

.article-section p {
  color: #374151;
  font-size: 17px;
}

.search-page-form {
  max-width: 720px;
  margin-top: 24px;
}

.search-page-form input {
  flex: 1;
  min-width: 0;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f3f4f6);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0 28px;
}

.footer-grid p,
.footer-grid a,
.copyright {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

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

  .desktop-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 650px;
    border-radius: 22px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 190px;
  }

  .hero-search-panel {
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: block;
  }

  .hero-search-panel form {
    margin-top: 12px;
    display: grid;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 158px;
  }

  .section-head,
  .rank-entry,
  .detail-grid,
  .footer-grid {
    display: block;
  }

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

  .category-grid,
  .overview-grid,
  .rank-board-list {
    grid-template-columns: 1fr;
  }

  .rank-entry,
  .page-hero,
  .detail-hero {
    padding: 24px;
  }

  .detail-poster {
    width: min(260px, 80%);
    margin-bottom: 24px;
  }

  .player-section,
  .article-section {
    padding: 18px;
  }

  .player-bar {
    opacity: 1;
    flex-wrap: wrap;
  }

  .footer-grid > div + div {
    margin-top: 26px;
  }
}

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }
}
