:root {
  --color-orange: #f97316;
  --color-orange-deep: #ea580c;
  --color-red: #ef4444;
  --color-amber: #f59e0b;
  --color-ink: #111827;
  --color-soft-ink: #374151;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-bg: #f8fafc;
  --color-white: #ffffff;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-ink);
  background: var(--color-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-orange-deep);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  border-radius: 999px;
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.36);
  font-size: 14px;
}

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

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-soft-ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-button:hover,
.nav-link.active {
  color: var(--color-orange-deep);
  background: #fff7ed;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 6px;
  width: 280px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--color-soft-ink);
}

.dropdown-panel a:hover {
  color: var(--color-orange-deep);
  background: #fff7ed;
}

.nav-search input,
.mobile-panel input,
.library-tools input {
  width: 250px;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  background: #ffffff;
  color: var(--color-ink);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.library-tools input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-orange-deep);
  border-radius: 99px;
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--color-orange-deep);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: radial-gradient(circle at 18% 22%, rgba(251, 146, 60, 0.35), transparent 34%),
              radial-gradient(circle at 78% 18%, rgba(239, 68, 68, 0.32), transparent 34%),
              linear-gradient(135deg, #7c2d12 0%, #111827 54%, #450a0a 100%);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.45), rgba(127, 29, 29, 0.76));
  z-index: 1;
}

.hero-slider {
  position: relative;
  z-index: 2;
  min-height: 650px;
}

.hero-slide {
  display: none;
  align-items: center;
  min-height: 650px;
  padding: 70px 0;
}

.hero-slide.active {
  display: flex;
  animation: fadeIn 0.55s ease both;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fed7aa;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 a {
  color: #ffffff;
}

.hero p {
  margin: 0;
  max-width: 660px;
  color: #ffedd5;
  font-size: 18px;
}

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

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

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.34);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-poster {
  position: relative;
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 28px -18px -18px 18px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.56), rgba(239, 68, 68, 0.42));
  filter: blur(8px);
  z-index: -1;
}

.hero-poster img {
  width: min(420px, 100%);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-left: auto;
  border: 10px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.36);
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.section {
  padding: 68px 0;
}

.section-tight {
  padding: 42px 0 68px;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--color-ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--color-muted);
}

.section-link {
  flex: 0 0 auto;
  color: var(--color-orange-deep);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.74));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.30);
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-orange-deep);
  font-size: 13px;
  font-weight: 750;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.34;
}

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

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.small-tag {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

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

.category-tile {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  border-radius: 18px;
  font-weight: 900;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  margin-top: 6px;
  color: var(--color-orange-deep);
  font-style: normal;
  font-weight: 750;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.33), transparent 28%),
              linear-gradient(135deg, #9a3412, #111827 56%, #7f1d1d);
}

.page-hero .container {
  padding: 74px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: #ffedd5;
  font-size: 18px;
}

.library-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.filter-pill {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-orange-deep);
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.rank-row strong {
  color: var(--color-orange-deep);
  font-size: 24px;
}

.rank-row img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

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

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

.rank-heat {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

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

.player-shell {
  overflow: hidden;
  background: #111827;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.30);
}

.video-box {
  position: relative;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(2, 6, 23, 0.32);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-red));
  border-radius: 999px;
  box-shadow: 0 20px 44px rgba(239, 68, 68, 0.38);
  font-size: 30px;
}

.player-info {
  padding: 24px;
  color: #ffffff;
}

.player-info h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.player-info p {
  margin: 0;
  color: #ffedd5;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-card p {
  margin: 0 0 16px;
  color: var(--color-soft-ink);
}

.breadcrumb {
  padding: 18px 0;
  color: var(--color-muted);
  font-size: 14px;
}

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

.side-card {
  padding: 22px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.side-poster {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 20px;
}

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

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.info-list dt {
  color: var(--color-muted);
}

.info-list dd {
  margin: 0;
  color: var(--color-ink);
  font-weight: 750;
  text-align: right;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1fr 1.1fr;
  gap: 34px;
  padding: 52px 0;
}

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

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

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

.footer-brand {
  color: #ffffff;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-slide {
    padding: 54px 0 82px;
  }

  .hero-poster img {
    width: min(360px, 86%);
    margin: 0 auto;
  }

  .section-head {
    display: block;
  }

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

  .rank-row {
    grid-template-columns: 54px 72px 1fr;
  }

  .rank-heat {
    grid-column: 3;
    width: max-content;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: 42px;
  }

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

  .category-tile {
    min-height: auto;
  }

  .rank-row {
    grid-template-columns: 46px 72px 1fr;
    gap: 12px;
  }

  .rank-row h2 {
    font-size: 18px;
  }

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