:root {
  --primary: #f97316;
  --primary-dark: #c2410c;
  --primary-soft: #fff7ed;
  --accent-soft: #fdf8f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #f9fafb;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.26);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

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

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

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-dark);
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  background: #ffffff;
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 56px;
  width: 100%;
  padding: 72px max(32px, calc((100vw - 1180px) / 2)) 70px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.88)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 12%, rgba(249, 115, 22, 0.38), transparent 32%), linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.88));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: #fed7aa;
  border: 1px solid rgba(253, 186, 116, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.32);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--primary);
}

.content-section,
.page-main {
  padding: 44px 0;
}

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

.section-head h2,
.page-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-intro,
.page-desc {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.type-badge,
.rank-num {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.category-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, var(--primary-soft));
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-card span {
  align-self: end;
  color: var(--primary-dark);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.filter-status {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 126px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffffff;
  border-radius: 18px;
  background: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-meta {
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 700;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 32px;
  box-shadow: 0 20px 48px rgba(249, 115, 22, 0.35);
  cursor: pointer;
}

.player-tools {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.84));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-box:hover .player-tools,
.player-box.is-playing .player-tools {
  opacity: 1;
}

.player-tools button {
  min-width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.player-tools .time-spacer {
  flex: 1;
}

.player-message {
  position: absolute;
  left: 50%;
  top: 22px;
  display: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.76);
  transform: translateX(-50%);
}

.player-box.has-message .player-message {
  display: block;
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.lead {
  margin: 0 0 18px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
  color: #4b5563;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 14px;
  font-weight: 700;
}

.article-copy h2 {
  margin: 24px 0 10px;
  font-size: 24px;
}

.article-copy p {
  margin: 0;
  color: #374151;
}

.side-card {
  position: sticky;
  top: 88px;
  margin-top: 0;
}

.side-card h2 {
  margin: 0 0 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

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

.related-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

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

.pagination-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.pagination-row a {
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  color: var(--primary-dark);
  font-weight: 800;
  text-align: center;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

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

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

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

.empty-state.is-visible {
  display: block;
}

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

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

  .side-card {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 20px 70px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

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

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

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

  .rank-item {
    grid-template-columns: 52px 92px 1fr;
  }

  .rank-meta {
    grid-column: 2 / -1;
  }

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

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

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

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

  .hero-actions,
  .pagination-row {
    flex-direction: column;
  }

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

  .rank-index,
  .rank-item img {
    width: 100%;
  }

  .rank-item img {
    height: 170px;
  }
}
