:root {
  --teal: #14b8a6;
  --teal-soft: #ccfbf1;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button, input, select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
  transition: transform 0.25s ease;
}

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

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 22px;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--teal);
  transition: width 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0d9488;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 14px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  color: #0d9488;
  background: #f0fdfa;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 20px 128px;
  background: linear-gradient(135deg, #2dd4bf 0%, #3b82f6 52%, #2563eb 100%);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(circle at 22px 22px, rgba(255, 255, 255, 0.55) 2px, transparent 3px);
  background-size: 56px 56px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), rgba(248, 250, 252, 0));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

.hero p {
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: clamp(18px, 2.6vw, 26px);
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.hero-actions,
.section-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
  background: #eff6ff;
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(10px);
}

.btn-blue {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.25);
}

.hero-focus {
  margin: 24px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
}

.hero-focus a {
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-shell,
.section-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 20px;
}

.page-shell.narrow {
  max-width: 980px;
}

.section-stack {
  display: grid;
  gap: 76px;
}

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

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #0d9488, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lead,
.page-lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #334155;
  font-weight: 800;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--teal-soft), var(--blue-soft));
}

.movie-card-wide .poster-wrap,
.featured-grid .poster-wrap {
  aspect-ratio: 4 / 3;
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.09);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.05) 58%, rgba(15, 23, 42, 0));
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.32;
  font-weight: 900;
  color: #0f172a;
}

.movie-body p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

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

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.category-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
}

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

.category-samples {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 700;
  font-size: 14px;
}

.category-page-head,
.ranking-hero,
.search-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #2dd4bf, #3b82f6 56%, #2563eb);
}

.category-page-head::before,
.ranking-hero::before,
.search-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 24px 24px, rgba(255, 255, 255, 0.65) 2px, transparent 3px);
  background-size: 58px 58px;
}

.page-head-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.page-head-inner .page-title,
.page-head-inner .page-lead {
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0d9488;
  font-weight: 800;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px 170px;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.no-results {
  display: none;
  padding: 34px;
  border-radius: 22px;
  color: #475569;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  text-align: center;
  font-weight: 800;
}

.no-results.show {
  display: block;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  display: grid;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #f8fafc;
}

.rank-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #2563eb);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

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

.detail-hero {
  padding: 42px 20px 26px;
  background: linear-gradient(180deg, #eff6ff, rgba(248, 250, 252, 0));
}

.detail-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 32px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--teal-soft), var(--blue-soft));
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-info .summary {
  color: #475569;
  font-size: 18px;
  margin: 0 0 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  font-weight: 800;
}

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

.player-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 0;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.62));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.35);
  font-size: 34px;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease;
}

.player-button:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

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

  .mobile-nav.open {
    display: block;
  }

  .hero {
    min-height: 62vh;
    padding-top: 72px;
  }

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

  .detail-poster {
    max-width: 420px;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    padding-inline: 14px;
  }

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

  .hero {
    padding-inline: 16px;
  }

  .page-shell,
  .section-shell {
    padding: 38px 16px;
  }

  .section-head {
    display: grid;
  }

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

  .movie-body {
    padding: 12px;
  }

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

  .movie-meta {
    gap: 8px;
    font-size: 12px;
  }

  .tag-row span {
    font-size: 11px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
