:root {
  color-scheme: light;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --green: #22c55e;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316 0%, #ef4444 48%, #ec4899 100%);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1280px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #f97316;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.logo-text {
  white-space: nowrap;
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.nav-search input,
.mobile-nav input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 10px 74px 10px 16px;
}

.nav-search input::placeholder,
.mobile-nav input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.nav-search button,
.mobile-nav button {
  position: absolute;
  right: 5px;
  border: 0;
  border-radius: 999px;
  color: #ef4444;
  background: #ffffff;
  padding: 6px 13px;
  cursor: pointer;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

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

.mobile-nav form {
  position: relative;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1280px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.hero-content > * {
  max-width: 720px;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(18px, 2.4vw, 23px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  padding: 7px 12px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.primary-button,
.section-link,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
  padding: 13px 24px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.section-link:hover,
.search-panel button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(239, 68, 68, 0.34);
}

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

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

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

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.warm-panel {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1280px) / 2));
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.category-tile {
  min-height: 164px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border-radius: var(--radius);
  color: #ffffff;
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.18);
}

.category-icon {
  font-size: 34px;
  line-height: 1;
}

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

.category-tile em {
  font-style: normal;
  opacity: 0.86;
}

.gradient-main,
.gradient-orange {
  background: linear-gradient(135deg, #f97316, #ef4444, #ec4899);
}

.gradient-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.gradient-pink {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.gradient-purple {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
}

.gradient-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.gradient-indigo {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.gradient-rose {
  background: linear-gradient(135deg, #fb7185, #ec4899);
}

.gradient-green {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
}

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

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

.movie-card {
  border-radius: 20px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link {
  display: block;
  height: 100%;
}

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

.compact .poster-wrap {
  aspect-ratio: 16 / 11;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  border-radius: 999px;
  color: #ffffff;
  background: #f97316;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ffffff;
  background: #f97316;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 3em;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  border-radius: 999px;
  background: #f3f4f6;
  padding: 4px 8px;
}

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

.movie-grid.is-list .movie-card .card-link {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.movie-grid.is-list .poster-wrap {
  aspect-ratio: auto;
  min-height: 180px;
}

.page-hero {
  color: #ffffff;
  padding: 76px 0;
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  padding: 18px;
}

.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.toolbar input,
.toolbar select,
.search-panel input {
  min-width: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  color: var(--text);
  background: #ffffff;
  padding: 12px 14px;
}

.toolbar input:focus,
.toolbar select:focus,
.search-panel input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.view-buttons {
  display: inline-flex;
  gap: 8px;
}

.view-buttons button {
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: #f3f4f6;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
}

.view-buttons button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.category-overview-card {
  border-radius: var(--radius);
  color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-overview-card a {
  display: grid;
  grid-template-rows: 160px 1fr;
  min-height: 350px;
}

.overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 16px 16px 0;
}

.overview-posters img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.overview-content {
  padding: 22px;
}

.overview-content h2 {
  margin: 12px 0 8px;
  font-size: 28px;
}

.overview-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
}

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

.ranking-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 22px;
}

.ranking-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px 58px 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row img {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-number {
  color: #f97316;
  font-weight: 1000;
}

.ranking-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  color: var(--muted);
  font-weight: 800;
}

.search-panel {
  display: flex;
  gap: 12px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 22px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
}

.search-summary {
  min-height: 30px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 18px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68), rgba(249, 115, 22, 0.2));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  margin-bottom: 12px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-intro p {
  max-width: 800px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.detail-intro .primary-button {
  margin-top: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 76px;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
  outline: 0;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.5), rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.55));
  cursor: pointer;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  font-size: 34px;
}

.player-start strong {
  font-size: 22px;
}

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

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
}

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

.text-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

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

.info-list dd {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 92px;
}

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

.side-list .movie-card {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

  .nav-search {
    width: 220px;
  }

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

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

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

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

  .hero {
    height: 560px;
  }

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

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

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

  .detail-poster {
    max-width: 320px;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 62px;
  }

  .logo-text {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    top: 54%;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 12px;
  }

  .content-section {
    padding: 46px 0;
  }

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

  .toolbar,
  .search-panel,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar input,
  .toolbar select {
    min-width: 0;
    width: 100%;
  }

  .movie-grid.is-list .movie-card .card-link {
    display: block;
  }

  .page-hero {
    padding: 54px 0;
  }

  .detail-hero-inner {
    padding: 38px 0;
  }

  .detail-layout {
    padding: 30px 0 56px;
  }

  .player-card,
  .text-card,
  .side-card {
    padding: 16px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
