:root {
  --bg: #f8fafc;
  --bg-soft: #e0f2fe;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --accent-soft: #cffafe;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.10);
}

.site-nav {
  width: min(var(--max), calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

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

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

.nav-link,
.mobile-link {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.mobile-menu {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.page-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 64px;
}

.hero {
  width: min(1400px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  padding: 116px 0 56px;
}

.hero-shell {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.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 img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.70) 44%, rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent 45%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 48px));
  min-height: 560px;
  padding: 72px 0 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #7dd3fc;
}

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

.hero p {
  max-width: 560px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-tags span,
.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

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

.btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

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

.btn-outline {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-ghost {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 38px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #67e8f9;
}

.quick-search {
  position: relative;
  z-index: 5;
  width: min(920px, calc(100% - 32px));
  margin: -58px auto 46px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search input,
.search-page-input,
.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.search-page-input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.content-section {
  margin: 62px 0;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.30);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.compact-card .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.56), transparent);
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(100%);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--primary);
}

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

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.90)),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 55%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.13);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.category-card span {
  margin-top: 18px;
  color: var(--primary);
  font-weight: 800;
}

.page-title {
  position: relative;
  overflow: hidden;
  padding: 38px;
  margin-bottom: 34px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.88)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 45%);
  box-shadow: var(--shadow);
}

.page-title p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  align-items: end;
  padding: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.catalog-tools label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px dashed rgba(37, 99, 235, 0.40);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 60px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.ranking-row img {
  width: 92px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.search-hero {
  display: grid;
  gap: 18px;
  padding: 36px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: var(--shadow);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-result-title {
  margin: 30px 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.player-card,
.detail-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.18)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.20), transparent 40%);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 92px;
  height: 92px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.player-title {
  padding: 24px;
}

.player-title h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.player-title p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-card {
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.detail-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-meta-list span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.text-panel {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.site-footer {
  margin-top: 40px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: #cbd5e1;
}

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

.footer-group h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #ffffff;
}

.footer-group a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  text-align: center;
}

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

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

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

  .detail-card {
    max-width: 520px;
  }
}

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

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

  .mobile-menu.is-open {
    display: grid;
    gap: 4px;
  }

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

  .hero {
    min-height: auto;
    padding-top: 96px;
  }

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

  .hero-content {
    width: calc(100% - 28px);
    padding: 44px 28px 76px;
  }

  .hero-slide::before {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.45));
  }

  .hero-dots {
    left: 28px;
  }

  .quick-search,
  .search-form {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .ranking-list,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-tools {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-nav {
    width: min(100% - 22px, var(--max));
  }

  .mobile-menu,
  .page-main,
  .hero,
  .quick-search,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

  .hero-shell {
    border-radius: 24px;
  }

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

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

  .movie-grid,
  .category-grid,
  .ranking-list,
  .footer-inner,
  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 48px 82px 1fr;
    gap: 12px;
  }

  .ranking-row img {
    width: 82px;
    height: 108px;
  }

  .page-title,
  .search-hero,
  .text-panel,
  .detail-card {
    padding: 22px;
  }
}
