:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--slate);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  transition: transform 0.25s ease;
}

.site-logo:hover .logo-mark {
  transform: rotate(12deg) scale(1.05);
}

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

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fff7ed;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 300px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  color: var(--slate);
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 14px;
  flex-wrap: wrap;
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.28)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.12)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 24px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 54px;
  align-items: center;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.page-hero span,
.detail-copy .breadcrumb,
.card-foot em {
  color: #fbbf24;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 0;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.22);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

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

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

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 35px 85px rgba(0, 0, 0, 0.45);
}

.hero-poster img,
.poster-wrap img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-poster span {
  position: absolute;
  inset: auto 24px 24px auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

.section-link {
  min-height: 40px;
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

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

.category-tile {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 191, 36, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.tile-glow {
  position: absolute;
  inset: -40px -40px auto auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), transparent 70%);
}

.category-tile strong {
  position: relative;
  display: block;
  font-size: 22px;
  font-weight: 950;
}

.category-tile em {
  position: relative;
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.tile-thumbs {
  position: absolute;
  left: 22px;
  bottom: 18px;
  display: flex;
}

.tile-thumbs img {
  width: 42px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #fff;
  margin-right: -12px;
  background: #0f172a;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

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

.poster-wrap img {
  transition: transform 0.3s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
  opacity: 0.84;
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #f97316;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: block;
  padding: 15px;
}

.card-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.card-meta,
.card-desc,
.card-foot {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.tag-row {
  margin-top: 10px;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-foot em {
  font-style: normal;
  font-size: 12px;
}

.ranking-panel .sticky-card,
.info-card,
.article-card,
.player-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.sticky-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.sticky-card h2,
.info-card h2,
.article-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.sticky-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  border-radius: 18px;
}

.movie-card-horizontal .poster-wrap {
  aspect-ratio: 2 / 3;
}

.movie-card-horizontal .card-body strong {
  min-height: auto;
}

.movie-card-horizontal .card-desc {
  -webkit-line-clamp: 1;
  min-height: auto;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b 48%, #78350f);
  color: #fff;
}

.page-hero {
  padding: 86px 24px;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
}

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

.category-overview-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 46px;
}

.pill-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pill-nav a {
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--slate);
  font-weight: 800;
  border: 1px solid var(--line);
}

.pill-nav a.current,
.pill-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-color: transparent;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--line);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: #f8fafc;
  outline: 0;
  color: var(--slate);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.hidden {
  display: none !important;
}

.ranking-page-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42)),
    var(--detail-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(6px) saturate(1.08);
}

.detail-inner {
  position: relative;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 32px 76px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.breadcrumb em {
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
}

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

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card {
  padding: 14px;
  background: #0f172a;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(0, 0, 0, 0.62));
  color: #fff;
  cursor: pointer;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.42);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 18px;
}

.player-shell.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.article-card,
.info-card {
  padding: 28px;
}

.article-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--slate);
  font-weight: 700;
}

.info-card dd a {
  color: #ea580c;
}

.tag-cloud {
  margin-top: 16px;
}

.site-footer {
  margin-top: 40px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #020617);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 44px;
}

.footer-brand p {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px 20px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

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

  .menu-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

  .ranking-panel .sticky-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    padding: 12px 16px;
  }

  .site-logo {
    font-size: 20px;
  }

  .header-search {
    display: none;
  }

  .hero-content {
    min-height: 660px;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 54px 18px 96px;
  }

  .hero-poster {
    width: min(240px, 70vw);
    justify-self: start;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

  .content-section,
  .category-overview-block {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

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

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

  .ranking-page-list {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 42px 16px;
  }

  .detail-poster {
    width: min(240px, 70vw);
  }

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

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

  .movie-card:not(.movie-card-horizontal) {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .movie-card:not(.movie-card-horizontal) .poster-wrap {
    aspect-ratio: 2 / 3;
  }

  .movie-card:not(.movie-card-horizontal) .card-body strong {
    min-height: auto;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
