:root {
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --purple: #7c3aed;
  --slate: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --gold: #facc15;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96), rgba(20, 184, 166, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
  backdrop-filter: blur(14px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 18px;
}

.brand-text strong,
.footer-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-text em {
  display: block;
  font-size: 12px;
  font-style: normal;
  opacity: 0.88;
  margin-top: 3px;
}

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

.main-nav a,
.mobile-panel nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel nav a:hover,
.mobile-panel nav a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fef08a;
  transform: translateY(-1px);
}

.nav-search {
  width: 270px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.nav-search input,
.mobile-panel input,
.inline-search input,
.category-filter input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.nav-search input {
  flex: 1;
  padding: 8px 12px;
  color: #ffffff;
}

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

.nav-search button,
.mobile-panel button,
.inline-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  color: #0f172a;
  background: #fef08a;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.mobile-panel form {
  display: flex;
  gap: 8px;
  padding: 8px;
  margin: 12px auto;
  width: min(100%, 720px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-panel input {
  flex: 1;
  padding: 10px 12px;
  color: #ffffff;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  width: min(100%, 720px);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #22d3ee, #2563eb 50%, #7c3aed);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, transparent 75%, transparent);
  background-size: 42px 42px;
  opacity: 0.35;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  opacity: 0.36;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 25%, rgba(255, 255, 255, 0.24), transparent 30%), linear-gradient(90deg, rgba(8, 13, 30, 0.82), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.32));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: #fef08a;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

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

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

.btn {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}

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

.btn-soft {
  color: #0f172a;
  background: #fef08a;
}

.btn-ghost {
  color: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 24px 22px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.04));
}

.hero-poster-info strong {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 52px;
  background: #fef08a;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: #ffffff;
}

.section.gradient {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.section.gradient .section-heading h2,
.section.gradient .section-heading p {
  color: #ffffff;
}

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

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

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

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

.movie-link {
  display: block;
  overflow: hidden;
  height: 100%;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0891b2, #1d4ed8);
}

.poster-frame img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

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

.type-badge,
.score-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 8px 10px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.88);
}

.score-badge {
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  color: #0f172a;
  background: #fef08a;
}

.rank-number {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

.movie-info {
  padding: 18px;
}

.movie-info h3,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.movie-info p,
.rank-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span,
.rank-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

.tag-row span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0891b2;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--tile-a), var(--tile-b));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.18);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: auto -30px -58px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.tile-pink {
  --tile-a: #ec4899;
  --tile-b: #f43f5e;
}

.tile-blue {
  --tile-a: #2563eb;
  --tile-b: #06b6d4;
}

.tile-cyan {
  --tile-a: #0891b2;
  --tile-b: #14b8a6;
}

.tile-rose {
  --tile-a: #f43f5e;
  --tile-b: #fb7185;
}

.tile-orange {
  --tile-a: #f97316;
  --tile-b: #ef4444;
}

.tile-purple {
  --tile-a: #7c3aed;
  --tile-b: #a855f7;
}

.tile-green {
  --tile-a: #22c55e;
  --tile-b: #10b981;
}

.tile-teal {
  --tile-a: #14b8a6;
  --tile-b: #0f766e;
}

.tile-indigo {
  --tile-a: #6366f1;
  --tile-b: #8b5cf6;
}

.tile-slate {
  --tile-a: #334155;
  --tile-b: #0f172a;
}

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

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

.rank-card a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card a:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.15);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.rank-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-cover strong {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb 55%, #7c3aed);
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.26), transparent 32%);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

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

.inline-search,
.category-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(720px, 100%);
  padding: 8px;
  margin-top: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.inline-search input,
.category-filter input {
  flex: 1;
  padding: 12px 16px;
  color: #ffffff;
}

.inline-search input::placeholder,
.category-filter input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.filter-status {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

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

.detail-wrap {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

.detail-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.breadcrumb a {
  color: #fef08a;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 800;
}

.player-section {
  padding: 56px 0 28px;
  background: #0f172a;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 76px rgba(2, 6, 23, 0.42);
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(15, 23, 42, 0.28));
  cursor: pointer;
}

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

.player-cover span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f172a;
  background: #fef08a;
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.38);
}

.player-cover strong {
  font-size: 20px;
}

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

.content-card,
.side-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.content-card {
  padding: 32px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.2;
}

.content-card p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 16px;
}

.side-card {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 100px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-list a:hover {
  background: #ecfeff;
  transform: translateX(4px);
}

.side-list img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.side-list strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.25;
}

.side-list span {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-weight: 800;
}

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

.site-footer {
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #1e3a8a 52%, #164e63);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 52px 0;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-brand p,
.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.74);
}

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

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fef08a;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .nav-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

  .hero-poster,
  .detail-cover {
    max-width: 340px;
    margin: 0 auto;
  }

  .side-card {
    position: static;
  }
}

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

  .nav-shell {
    min-height: 64px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .brand-text em {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 640px;
  }

  .hero-inner {
    padding: 46px 0 78px;
    gap: 28px;
  }

  .hero p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

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

  .movie-info {
    padding: 14px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .movie-info p {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .rank-card a {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .page-hero,
  .detail-hero {
    padding: 48px 0;
  }

  .content-card {
    padding: 22px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.three,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-actions,
  .inline-search,
  .category-filter {
    display: grid;
    border-radius: 24px;
  }

  .inline-search button,
  .category-filter button {
    width: 100%;
  }
}
