* {
  box-sizing: border-box;
}

:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f4f6fb;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 24px;
  letter-spacing: -0.5px;
}

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #111827;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 20px 18px;
  background: #fff;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #f97316 45%, #ef4444 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 35%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 30%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  padding: 78px 0;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -2px;
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.8;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-pills span,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

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

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

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

.btn-light {
  color: var(--orange-dark);
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-card {
  position: relative;
  height: 470px;
  overflow: hidden;
  border-radius: 32px;
  background: #111827;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.1) 58%, rgba(15, 23, 42, 0.2));
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
}

.hero-card-info h2 {
  margin: 10px 0 10px;
  font-size: 30px;
}

.hero-card-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero-dots {
  position: absolute;
  left: 28px;
  bottom: -34px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

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

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

.section {
  padding: 56px 0;
}

.section-soft {
  background: var(--soft);
}

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

.section-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.6px;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  height: 258px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.movie-card-large .card-poster {
  height: 350px;
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.78), transparent);
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.82);
  font-weight: 900;
}

.card-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: var(--orange);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.rank-panel,
.search-panel,
.category-card,
.info-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  padding: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #fff7ed;
}

.rank-item img {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.rank-no {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
}

.rank-info {
  min-width: 0;
}

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

.rank-info em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 54px 0;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316 45%, #ef4444);
}

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

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

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

.category-card {
  display: block;
  padding: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card span {
  color: var(--muted);
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-bottom: 24px;
}

.input,
.select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  outline: none;
}

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

.search-panel {
  padding: 22px;
  margin-bottom: 26px;
}

.search-results {
  min-height: 220px;
}

.movie-detail {
  padding: 44px 0 64px;
}

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

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  transition: opacity 0.2s ease;
}

.player-cover.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.38);
  cursor: pointer;
}

.player-status {
  padding: 12px 18px;
  color: #cbd5e1;
  background: #020617;
  font-size: 14px;
}

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

.info-panel {
  padding: 26px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 800;
}

.prose h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.prose p {
  margin: 0 0 16px;
  color: #374151;
  line-height: 1.9;
}

.poster-side img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: #111827;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.side-list img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

.side-list strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-list span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 42px 0;
}

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

.site-footer p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fdba74;
}

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

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

.empty-state {
  padding: 42px;
  border-radius: 24px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

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

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

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

  .detail-side {
    grid-template-columns: 300px 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0 70px;
  }

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

  .grid,
  .grid-five,
  .category-grid,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

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

  .card-poster {
    height: 320px;
  }
}
