:root {
  --bg: #ffffff;
  --soft-bg: #fff7ed;
  --soft-bg-2: #fff1f2;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #ea580c;
  --amber: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.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 {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

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

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: var(--text);
}

.header-search input {
  width: 230px;
}

.header-search button,
.mobile-nav button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: #374151;
}

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

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

.mobile-nav a {
  font-weight: 800;
  color: #374151;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  flex: 1;
}

.hero-slider {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, #111827, #1f2937);
}

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

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

.hero-bg {
  position: absolute;
  inset: -28px;
  background-position: center;
  background-size: cover;
  filter: blur(10px) brightness(0.34);
  transform: scale(1.06);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(249, 115, 22, 0.34), transparent 26%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.96));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #f97316;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  color: #fff;
  font-weight: 950;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 800;
}

.tag-row span {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.32);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: perspective(1200px) rotateY(-8deg);
}

.hero-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.hero-poster span,
.score {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--amber);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.35);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  border-radius: 999px;
  background: #fff;
}

.section {
  padding: 74px 0;
}

.section-soft,
.section-categories {
  background: linear-gradient(180deg, var(--soft-bg), #fff);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #111827;
  font-weight: 950;
}

.section-title p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-link {
  flex: 0 0 auto;
  color: var(--red);
  font-weight: 900;
}

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

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

.movie-card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: rgba(248, 113, 113, 0.52);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

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

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

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-desc {
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-no {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.3);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 20px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #ea580c);
  box-shadow: 0 16px 38px rgba(220, 38, 38, 0.22);
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

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

.category-tile em {
  margin-top: 10px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.category-tile img {
  position: absolute;
  right: -18px;
  bottom: -30px;
  width: 110px;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.45;
  transform: rotate(8deg);
}

.category-glow {
  position: absolute;
  inset: auto -40px -60px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.page-main {
  background: #fff;
}

.page-hero {
  position: relative;
  padding: 90px 0;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(249, 115, 22, 0.5), transparent 24%),
    linear-gradient(135deg, #111827, #7f1d1d 54%, #ea580c);
}

.small-hero {
  padding: 76px 0;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.9;
}

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

.category-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-panel-link {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 220px;
}

.category-panel-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 14px;
  background: linear-gradient(135deg, #7f1d1d, #ea580c);
}

.category-panel-posters img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.category-panel-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-panel-body h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
}

.category-panel-body p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.category-panel-body span {
  color: var(--red);
  font-weight: 900;
}

.filter-bar,
.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

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

.ranking-hero {
  padding-bottom: 130px;
}

.rank-spotlight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.rank-spotlight-card {
  position: relative;
  min-height: 260px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

.rank-img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  filter: brightness(0.72);
}

.rank-spotlight-card strong,
.rank-spotlight-card em,
.rank-medal {
  position: absolute;
  z-index: 2;
}

.rank-medal {
  top: 18px;
  left: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 950;
}

.rank-spotlight-card strong {
  left: 18px;
  right: 18px;
  bottom: 52px;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 950;
}

.rank-spotlight-card em {
  left: 18px;
  bottom: 18px;
  color: #fbbf24;
  font-style: normal;
  font-weight: 950;
}

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

.detail-bg {
  position: absolute;
  inset: -28px;
  background-position: center;
  background-size: cover;
  filter: blur(12px) brightness(0.32);
  transform: scale(1.08);
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.95));
}

.detail-top {
  position: relative;
  z-index: 2;
  padding: 42px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 36px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.detail-one-line {
  max-width: 780px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
}

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

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.main-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.34);
  font-size: 32px;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.detail-article,
.detail-aside {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.detail-article {
  padding: 34px;
}

.detail-article h2,
.detail-aside h2 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 950;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

.detail-article p {
  margin: 0 0 16px;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.detail-aside {
  padding: 28px;
}

.detail-aside dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px 16px;
  margin: 0;
}

.detail-aside dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-aside dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
}

.empty-state.show {
  display: block;
}

.site-footer {
  padding: 46px 0;
  color: rgba(255, 255, 255, 0.76);
  background: #111827;
}

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

.footer-inner strong {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
  line-height: 1.8;
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

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

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 17px;
  }

  .section {
    padding: 52px 0;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-panel-grid,
  .rank-spotlight {
    grid-template-columns: 1fr;
  }

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-top {
    padding-top: 28px;
  }

  .detail-poster {
    width: 220px;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-desc {
    -webkit-line-clamp: 2;
  }

  .tag-row {
    display: none;
  }
}
