* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --deep: #0f172a;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #f59e0b;
  --green: #22c55e;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.rainbow-bar {
  height: 4px;
  background: linear-gradient(90deg, #f87171, #facc15, #4ade80, #22d3ee, #60a5fa, #a78bfa);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

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

.nav-shell {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #f97316, #7c3aed);
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.32);
}

.logo-text {
  font-size: 1.36rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ef4444, #f97316, #f59e0b, #22c55e, #06b6d4, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-search input,
.mobile-panel input,
.filter-controls input,
.filter-controls select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 170px;
  padding: 10px 14px;
}

.nav-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--blue);
  cursor: pointer;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel a {
  color: #374151;
  font-weight: 700;
}

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

.mobile-panel input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-inner {
  display: grid;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 96px 0 122px;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

.hero-copy h1,
.hero-copy h2,
.simple-hero h1,
.detail-heading h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 900px;
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(2.2rem, 4.6vw, 4.6rem);
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

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

.primary-button,
.ghost-button,
.text-button,
.page-turner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 26px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.page-turner a:hover {
  transform: translateY(-2px);
}

.ghost-button {
  padding: 12px 24px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 480px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  background: linear-gradient(135deg, #1e293b, #7c3aed);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border-radius: 18px;
  padding: 14px 16px;
  color: #ffffff;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 32px;
  left: 0;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.8rem;
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.section-shell {
  padding: 66px 0;
}

.intro-section {
  padding-bottom: 24px;
}

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

.section-heading.centered {
  display: block;
  max-width: 850px;
  margin: 0 auto 24px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p:last-child,
.intro-section p:last-child {
  color: var(--muted);
}

.section-link,
.text-button {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

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

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #e0f2fe, #fce7f3, #ede9fe);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.58));
}

.play-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.24);
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
}

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

.card-meta {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 8px 0;
  overflow: hidden;
  color: #1f2937;
  font-size: 1.06rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 0.76rem;
  font-weight: 700;
}

.category-band {
  background: #ffffff;
}

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

.category-tile,
.category-card-full {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.category-thumbs,
.category-cover-row {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.category-thumbs img,
.category-cover-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.category-tile strong,
.category-card-full h2 {
  color: #111827;
  font-size: 1.15rem;
}

.category-tile em,
.category-card-full p {
  color: var(--muted);
  font-style: normal;
}

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

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0 0 10px;
}

.mini-links {
  display: grid;
  gap: 6px;
  margin: 14px 0 16px;
}

.mini-links a {
  color: #4b5563;
  font-size: 0.92rem;
}

.mini-links a:hover {
  color: var(--blue);
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: linear-gradient(120deg, #ef4444, #f97316, #22c55e, #06b6d4, #6366f1, #8b5cf6);
  background-position: center;
  background-size: cover;
}

.simple-hero .section-shell {
  padding: 86px 0;
}

.simple-hero h1 {
  max-width: 900px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.simple-hero p:last-child {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel h2 {
  margin: 0 0 6px;
}

.filter-panel p {
  margin: 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 12px 14px;
}

.result-line {
  grid-column: 1 / -1;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  border-radius: 14px;
  padding: 12px 14px;
  color: #991b1b;
  background: #fee2e2;
}

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

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

.rank-link {
  display: grid;
  grid-template-columns: 52px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316, #8b5cf6);
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.rank-poster img {
  width: 72px;
  height: 96px;
  object-fit: cover;
}

.rank-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank-content strong,
.rank-content em,
.rank-content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content strong {
  color: #1f2937;
  font-size: 1.05rem;
}

.rank-content em,
.rank-content span {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

.rank-score {
  color: #ef4444;
  font-weight: 900;
}

.detail-hero {
  background-position: center;
  background-size: cover;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

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

.detail-heading {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  align-items: end;
}

.detail-cover {
  width: 230px;
  aspect-ratio: 3 / 4;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.detail-heading h1 {
  max-width: 940px;
  font-size: clamp(2.5rem, 5vw, 5rem);
}

.detail-heading p:last-of-type {
  max-width: 900px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

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

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

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.14), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 20px 44px rgba(255, 255, 255, 0.22);
  cursor: pointer;
}

.player-layer span {
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.56);
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.content-block,
.info-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.content-block h2,
.info-panel h2 {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 1.5rem;
}

.content-block p {
  margin: 0;
  color: #374151;
}

.info-panel {
  position: sticky;
  top: 94px;
  margin-top: 0;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: #1f2937;
}

.page-turner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.page-turner a {
  padding: 11px 18px;
  color: #ffffff;
  background: var(--blue);
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding: 46px 0;
}

.logo-footer .logo-text {
  color: #ffffff;
}

.footer-brand p {
  max-width: 640px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links a:hover {
  color: #ffffff;
}

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

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

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

  .hero-poster {
    display: none;
  }

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

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

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

  .info-panel {
    position: static;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-inner {
    padding-top: 70px;
  }

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

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

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

  .detail-cover {
    width: 180px;
  }

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

@media (max-width: 560px) {
  .nav-shell,
  .section-shell,
  .footer-shell,
  .hero-inner,
  .hero-controls,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .logo-text {
    font-size: 1.02rem;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .hero-copy h2 {
    font-size: 2.1rem;
  }

  .hero-actions {
    display: grid;
  }

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

  .rank-link {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .rank-poster img {
    width: 58px;
    height: 78px;
  }

  .simple-hero .section-shell,
  .section-shell {
    padding: 44px 0;
  }
}
