:root {
  color-scheme: light;
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --card: #ffffff;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 650;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--orange);
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: #374151;
}

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

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

.mobile-link:hover {
  background: #fff7ed;
  color: var(--orange);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 720px;
  color: #fff;
  padding: 32px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 14px;
  font-weight: 750;
}

.hero-inner h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 900;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
  color: #f9fafb;
}

.hero-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  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: #fff;
  background: var(--orange);
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.32);
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-light {
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.72);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.section {
  padding: 74px 0;
}

.section.alt {
  background: #f3f4f6;
}

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

.section-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 900;
  color: #111827;
}

.section-desc {
  margin: 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--orange);
  font-weight: 800;
}

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

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

.card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  height: 250px;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

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

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

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.card-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 13px;
}

.movie-card-horizontal .card-link {
  flex-direction: row;
}

.movie-card-horizontal .card-poster {
  width: 180px;
  height: auto;
  flex-shrink: 0;
}

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

.category-card {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 21px;
}

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

.category-card span {
  margin-top: 22px;
  color: var(--orange);
  font-weight: 850;
}

.page-hero {
  padding: 76px 0 64px;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(234, 88, 12, 0.45), transparent 34%), linear-gradient(135deg, #111827, #1f2937 46%, #7c2d12);
}

.page-hero.small-hero {
  padding: 62px 0 48px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

.toolbar {
  margin-top: -28px;
  padding-bottom: 64px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px 138px;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.search-panel input,
.search-panel select,
.search-panel button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.search-panel button {
  border-color: var(--orange);
  color: #fff;
  background: var(--orange);
  font-weight: 800;
}

.filter-content {
  padding-top: 34px;
}

.list-mode .movie-grid {
  grid-template-columns: 1fr;
}

.list-mode .movie-card .card-link {
  flex-direction: row;
}

.list-mode .movie-card .card-poster {
  width: 220px;
  height: auto;
  flex-shrink: 0;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 56px 86px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 120px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.rank-item img {
  width: 86px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

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

.rank-copy strong,
.rank-copy small,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  color: #111827;
  font-size: 18px;
}

.rank-copy small {
  margin-top: 4px;
  color: var(--orange);
  font-style: normal;
  font-weight: 750;
}

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

.cta-band {
  color: #fff;
  text-align: center;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.cta-band .section-title,
.cta-band .section-desc {
  color: #fff;
}

.cta-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.cta-pills a {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--orange);
  background: #fff;
  font-weight: 850;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-size: 14px;
  font-weight: 750;
}

.detail-main {
  padding: 46px 0 74px;
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  z-index: 2;
}

.player-overlay.is-hidden {
  display: none;
}

.player-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.45);
  font-size: 34px;
  transform: translateZ(0);
}

.detail-panel,
.sidebar-panel {
  margin-top: 26px;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-panel h2,
.sidebar-panel h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #374151;
}

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

.info-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  color: #374151;
}

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

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 750;
}

.sidebar-panel {
  margin-top: 0;
  position: sticky;
  top: 102px;
}

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

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

.related-item img {
  width: 80px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.related-item strong,
.related-item span {
  display: block;
}

.related-item strong {
  color: #111827;
  line-height: 1.35;
}

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 56%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 46px 0;
}

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

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

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .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;
  }

  .sidebar-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-slider {
    height: auto;
    min-height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.62));
  }

  .hero-content {
    align-items: end;
    padding-bottom: 58px;
  }

  .hero-inner h1,
  .page-hero h1 {
    font-size: 40px;
  }

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

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

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

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

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

  .list-mode .movie-card .card-link,
  .movie-card-horizontal .card-link {
    flex-direction: column;
  }

  .list-mode .movie-card .card-poster,
  .movie-card-horizontal .card-poster {
    width: auto;
    height: 230px;
  }
}

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

  .topbar {
    min-height: 68px;
  }

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

  .brand-title {
    max-width: 210px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-inner p {
    font-size: 16px;
  }

  .hero-meta {
    gap: 8px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .card-poster {
    height: 240px;
  }

  .rank-item a {
    grid-template-columns: 46px 74px 1fr;
    gap: 10px;
  }

  .rank-item img {
    width: 74px;
    height: 84px;
  }

  .detail-panel,
  .sidebar-panel {
    padding: 20px;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

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