:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --soft: #fff7ed;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.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.9);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.32);
  font-size: 15px;
}

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

.nav-link,
.mobile-link {
  color: #4b5563;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 650;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--orange-dark);
  border-radius: 4px;
}

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

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

.hero-shell {
  position: relative;
  background: #111827;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(234, 88, 12, 0.68), rgba(245, 158, 11, 0.28)),
    linear-gradient(180deg, rgba(17, 24, 39, 0.35), rgba(17, 24, 39, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 380px;
  align-items: center;
  gap: 54px;
  min-height: 650px;
  padding: 86px 0 130px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin: 0 0 18px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-weight: 750;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.hero-summary {
  max-width: 720px;
  margin: 20px 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.hero-shortcuts,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: 650;
}

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

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

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

.btn.primary {
  color: var(--orange-dark);
  background: #fff;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 45px rgba(249, 115, 22, 0.48);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.22s ease, background 0.22s ease;
}

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

.hero-panel {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
  margin-top: -88px;
  padding-bottom: 48px;
}

.hero-search,
.local-filter,
.search-box {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.hero-search input,
.local-filter input,
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
}

.hero-search button,
.search-box button {
  border: 0;
  padding: 11px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  font-weight: 800;
}

.hero-shortcuts {
  grid-column: 1;
  align-content: start;
}

.hero-shortcuts a {
  padding: 8px 13px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-weight: 720;
}

.hero-rank-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 20px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-rank-card h2,
.section-title h2,
.page-head h1,
.detail-card h2,
.sidebar-card h2 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 76px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  transition: background 0.22s ease, transform 0.22s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(2px);
}

.rank-item img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f4f6;
}

.rank-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

.content-section {
  margin-bottom: 58px;
}

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

.section-title h2,
.page-head h1 {
  font-size: clamp(28px, 4vw, 38px);
}

.section-title a {
  color: var(--orange-dark);
  font-weight: 800;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
  border-color: rgba(249, 115, 22, 0.35);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.68));
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.duration-badge,
.type-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(17, 24, 39, 0.74);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.22s ease;
}

.movie-card:hover strong {
  color: var(--orange-dark);
}

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

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

.rating {
  color: #d97706;
  font-weight: 800;
  white-space: nowrap;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-dark), var(--amber));
}

.page-head {
  max-width: 820px;
}

.page-head p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.category-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  min-height: 180px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.14);
}

.category-card strong {
  color: #111827;
  font-size: 24px;
}

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

.category-card span {
  color: var(--orange-dark);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -30px auto 32px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.local-filter {
  width: min(520px, 100%);
  box-shadow: none;
}

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

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

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

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.player-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.45);
  font-size: 28px;
  transition: transform 0.22s ease;
}

.player-overlay:hover .player-button {
  transform: scale(1.08);
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  color: #111827;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 14px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags span,
.card-tags span {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fed7aa;
}

.detail-card h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #4b5563;
}

.review-box {
  padding: 20px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-radius: 18px;
  border: 1px solid #fed7aa;
}

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

.sidebar-card h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.22s ease;
}

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

.related-item img {
  width: 110px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f4f6;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.search-area {
  max-width: 780px;
  margin: -32px auto 34px;
}

.search-box {
  box-shadow: var(--shadow);
}

.search-status {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 650;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 130px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

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

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

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

.rank-score {
  color: #d97706;
  font-size: 22px;
  font-weight: 900;
}

.site-footer {
  padding: 42px 0;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-logo {
  color: #fff;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
}

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

.footer-links a {
  color: #fff7ed;
}

.hidden-by-filter {
  display: none !important;
}

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

  .hero-content {
    grid-template-columns: 1fr 300px;
  }

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

  .sidebar-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 54px 0 150px;
  }

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

  .hero-panel {
    grid-template-columns: 1fr;
    margin-top: -72px;
  }

  .hero-rank-card,
  .hero-shortcuts {
    grid-column: auto;
    grid-row: auto;
  }

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

  .filter-bar,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 42px 92px 1fr;
  }

  .rank-row img {
    width: 92px;
    height: 70px;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 16px;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-search,
  .search-box {
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search input,
  .search-box input {
    width: 100%;
    padding: 12px 14px;
  }

  .hero-search button,
  .search-box button {
    width: 100%;
  }

  .detail-card {
    padding: 20px;
  }

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

  .related-item img {
    width: 92px;
    height: 66px;
  }
}
