:root {
  --bg: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --red: #dc2626;
  --red-2: #ef4444;
  --orange: #f97316;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: #fff;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-2deg);
}

.logo-name {
  display: block;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #fb7185, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-sub {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: -2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.site-nav a {
  color: #e5e7eb;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fb7185;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form,
.inline-filter {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.search-form input,
.inline-filter input,
.inline-filter select {
  width: 240px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 11px 14px;
}

.inline-filter select {
  width: 160px;
  color: var(--ink);
  background: #fff;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.search-form input::placeholder,
.inline-filter input::placeholder {
  color: #cbd5e1;
}

.search-form button,
.filter-button {
  border: 0;
  cursor: pointer;
  color: #fff;
  padding: 11px 15px;
  background: transparent;
  transition: background 0.2s ease;
}

.search-form button:hover,
.filter-button:hover {
  background: rgba(148, 163, 184, 0.18);
}

.menu-button {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74) 48%, rgba(15, 23, 42, 0.38));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 42px;
  padding: 72px 0 108px;
}

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

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.3);
  backdrop-filter: blur(8px);
  margin-bottom: 18px;
}

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

.hero p {
  margin: 0 0 28px;
  color: #f8fafc;
  font-size: clamp(16px, 2vw, 22px);
  max-width: 680px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fee2e2;
  color: #b91c1c;
}

.pill.dark {
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pill.glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  background: #fff;
  color: #991b1b;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.button.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--red-2), var(--orange));
}

.button.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 44px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 74px;
  background: #fff;
}

.section {
  padding: 68px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

.card,
.category-card,
.info-panel,
.rank-card,
.detail-panel {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #0f172a);
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster img,
.category-card:hover img,
.rank-card:hover img,
.related-item:hover img {
  transform: scale(1.08);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.corner {
  position: absolute;
  z-index: 3;
  top: 12px;
  padding: 4px 9px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.corner.left {
  left: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.corner.right {
  right: 12px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.rank-card:hover h3,
.related-item:hover h3 {
  color: var(--red);
}

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

.category-card {
  padding: 24px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 40%),
    #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.banner {
  color: #fff;
  padding: 62px 0;
  background: linear-gradient(110deg, var(--red), var(--orange));
  position: relative;
  overflow: hidden;
}

.banner::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -120px;
  top: -160px;
  background: rgba(255, 255, 255, 0.14);
}

.banner .container {
  position: relative;
  z-index: 2;
}

.banner h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.banner p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.rank-cover {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
}

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

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

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

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

.player-panel {
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 1;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.30), rgba(15, 23, 42, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  font-size: 42px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 20px 44px rgba(239, 68, 68, 0.34);
  transition: transform 0.22s ease;
}

.player-start:hover span {
  transform: scale(1.08);
}

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

.detail-panel {
  padding: 26px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

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

.detail-title {
  margin: 18px 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-section h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-section p {
  color: #374151;
  margin: 0 0 14px;
  white-space: pre-wrap;
}

.review-box {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff1f2, #ffedd5);
  border: 1px solid #fed7aa;
}

.sidebar {
  position: sticky;
  top: 100px;
}

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

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

.related-item img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}

.site-footer {
  margin-top: 78px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-grid h3 {
  color: #fff;
  margin: 0 0 14px;
}

.footer-grid p,
.footer-grid a {
  color: #cbd5e1;
  font-size: 14px;
}

.footer-grid a:hover {
  color: #fb7185;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px 24px;
    background: var(--slate-900);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .site-nav.is-open {
    display: flex;
  }

  .header-actions .search-form {
    display: none;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px 0 102px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .sidebar {
    position: static;
  }

  .rank-card {
    grid-template-columns: 54px 84px 1fr;
  }

  .rank-card .button {
    display: none;
  }

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

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

  .logo-sub {
    display: none;
  }

  .logo-name {
    font-size: 19px;
  }

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

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

  .hero-actions,
  .section-head,
  .filter-bar,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-filter {
    width: 100%;
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
  }

  .inline-filter input,
  .inline-filter select {
    width: 100%;
    color: var(--ink);
  }

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

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

  .rank-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 14px;
  }

  .rank-cover {
    width: 72px;
    height: 72px;
  }

  .detail-panel {
    padding: 20px;
  }

  .player-start span {
    width: 70px;
    height: 70px;
    font-size: 34px;
  }
}
