:root {
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --blue: #3b82f6;
  --green: #22c55e;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  color: #fff;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.22);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.90);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff7cc;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: 310px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 8px 12px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.80);
}

.header-search button,
.search-block button {
  border: 0;
  color: var(--red);
  background: #fff;
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  background: rgba(190, 24, 93, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
}

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

.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;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.36), transparent 34%), linear-gradient(135deg, #111827, #831843);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 680px;
  color: #fff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.30);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2,
.sub-hero h1,
.detail-hero h1 {
  margin: 0 0 18px;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-content h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.hero-content h2 {
  font-size: clamp(28px, 4vw, 52px);
}

.hero-content p,
.sub-hero p,
.detail-hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin-bottom: 30px;
}

.hero-tags span,
.detail-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 13px;
  backdrop-filter: blur(10px);
}

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

.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.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.30);
}

.btn-glass,
.btn-outline {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(12px);
}

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

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

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

.category-section,
.movie-section,
.editor-section,
.search-block,
.filter-panel,
.category-page-grid,
.rank-layout,
.detail-layout {
  padding: 72px 0 0;
}

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

.section-heading h2 {
  display: inline;
  margin: 0 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: var(--soft-shadow);
}

.section-more {
  color: var(--red);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  min-height: 176px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-overview-card span {
  font-size: 38px;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 14px 0 8px;
  font-size: 23px;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  opacity: 0.92;
}

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

.tile-1,
.gradient-warm {
  background: linear-gradient(135deg, #ec4899, #ef4444);
}

.tile-2,
.gradient-search {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

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

.tile-4 {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

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

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

.movie-card {
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.28), transparent 30%), linear-gradient(135deg, #111827, #831843);
}

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

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

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.35);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta,
.card-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card h3 {
  margin: 11px 0 8px;
  line-height: 1.3;
  font-size: 18px;
}

.movie-card p {
  margin: 0 0 14px;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-bottom: 14px;
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
  padding: 3px 9px;
}

.card-stats {
  justify-content: space-between;
  font-weight: 800;
}

.movie-card.horizontal .card-link,
.movie-card.ranked .card-link {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card.horizontal .poster-wrap,
.movie-card.ranked .poster-wrap {
  aspect-ratio: auto;
  min-height: 220px;
}

.movie-card.compact .card-link {
  display: grid;
  grid-template-columns: 96px 1fr;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: auto;
  min-height: 136px;
}

.movie-card.compact .card-body {
  padding: 14px;
}

.movie-card.compact h3 {
  font-size: 15px;
  margin: 7px 0;
}

.movie-card.compact p,
.movie-card.compact .tag-row {
  display: none;
}

.editor-section {
  padding: 42px;
  margin-top: 72px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.search-block {
  margin-top: 72px;
  margin-bottom: 72px;
  padding: 48px;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  text-align: center;
}

.search-block h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
}

.search-block p {
  margin: 0 auto 24px;
  max-width: 680px;
  opacity: 0.92;
}

.search-block form {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.search-block input {
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 12px 18px;
}

.search-block input::placeholder {
  color: rgba(255, 255, 255, 0.80);
}

.sub-hero {
  color: #fff;
  padding: 76px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

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

.filter-panel {
  padding-bottom: 72px;
}

.filter-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-row input,
.filter-row select {
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.filter-row input {
  flex: 1;
}

.empty-state {
  display: none;
  margin-top: 30px;
  padding: 36px;
  border-radius: 24px;
  text-align: center;
  background: #fff;
  color: var(--muted);
  box-shadow: var(--soft-shadow);
}

.empty-state.is-visible {
  display: block;
}

.category-overview-card {
  min-height: 280px;
}

.category-samples {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  padding-bottom: 72px;
}

.rank-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.rank-sidebar h2 {
  margin: 0 0 16px;
}

.rank-links {
  display: grid;
  gap: 10px;
}

.rank-links a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  color: #374151;
  font-weight: 700;
}

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

.detail-hero {
  position: relative;
  min-height: 460px;
  color: #fff;
  overflow: hidden;
  background: #111827;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) scale(1.04);
  opacity: 0.72;
  background: radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.30), transparent 30%), linear-gradient(135deg, #111827, #831843);
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.24));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 78px 0;
}

.detail-hero h1 {
  font-size: clamp(32px, 5vw, 58px);
}

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

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

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.40);
  font-size: 28px;
}

.play-layer strong {
  display: block;
  font-size: 20px;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

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

.detail-info dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.detail-info div {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.detail-info dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-info dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.detail-info a {
  color: var(--red);
}

.detail-tags a,
.detail-tags span {
  padding: 7px 12px;
  color: #9a3412;
  background: #ffedd5;
}

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

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

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

.site-footer {
  margin-top: 56px;
  color: #fff;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .desktop-nav .nav-link:nth-last-child(-n + 3) {
    display: none;
  }

  .header-search {
    width: 260px;
  }
}

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

  .mobile-toggle {
    display: inline-block;
  }

  .mobile-panel.is-open {
    display: block;
  }

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

  .horizontal-grid,
  .rank-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-sidebar,
  .side-card {
    position: static;
  }
}

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

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

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

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

  .hero-content {
    width: min(100% - 32px, 1180px);
  }

  .hero-actions,
  .search-block form,
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

  .movie-card.horizontal .card-link,
  .movie-card.ranked .card-link,
  .movie-card.compact .card-link {
    grid-template-columns: 120px 1fr;
  }

  .movie-card.horizontal .poster-wrap,
  .movie-card.ranked .poster-wrap,
  .movie-card.compact .poster-wrap {
    min-height: 170px;
  }

  .editor-section,
  .search-block,
  .detail-card,
  .side-card {
    padding: 22px;
    border-radius: 22px;
  }

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