* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --panel: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

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(--dark);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #eef6ff 100%);
  line-height: 1.65;
}

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

img {
  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.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #1d4ed8;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon,
.footer-brand:hover .brand-icon {
  transform: scale(1.08) rotate(2deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  color: #334155;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
  border-radius: 999px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 45%, #0f172a 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.55), transparent 25%), radial-gradient(circle at 80% 10%, rgba(125, 211, 252, 0.9), transparent 26%), linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.1) 75%, transparent 75%, transparent);
  background-size: auto, auto, 72px 72px;
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  min-height: 640px;
  margin: 0 auto;
  padding: 74px 22px 82px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  gap: 56px;
  align-items: center;
  animation: fadeUp 0.55s ease both;
}

.hero-slide.active {
  display: grid;
}

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

.hero-pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 22px 0 10px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
  color: #cffafe;
}

.hero-copy p {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: 19px;
  color: #dbeafe;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

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

.primary-btn,
.ghost-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

.primary-btn:hover,
.search-form button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.24);
}

.ghost-btn {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.ghost-btn.dark {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.36);
  transform: rotate(1.5deg);
}

.hero-poster::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 4.12;
}

.hero-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-score {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.hero-dots {
  position: absolute;
  left: 22px;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

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

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

.panel-section,
.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px;
}

.home-search {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-form,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.search-form label,
.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: var(--dark);
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-form button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
}

.filter-panel {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) minmax(170px, 220px);
  margin-bottom: 26px;
}

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

.section-title h2,
.ranking-head h2,
.related-cats h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

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

.section-title a,
.ranking-head a,
.text-link {
  color: #1d4ed8;
  font-weight: 900;
}

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

.category-tile {
  min-height: 145px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid #dbeafe;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.14);
}

.category-tile span {
  display: block;
  font-weight: 950;
  font-size: 20px;
  color: #1e3a8a;
}

.category-tile small {
  display: block;
  margin-top: 12px;
  color: #475569;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-link {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  overflow: hidden;
}

.cover-link::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .cover-link img,
.rank-cover:hover img,
.category-covers:hover img {
  transform: scale(1.05);
}

.year-badge,
.play-dot {
  position: absolute;
  z-index: 2;
}

.year-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.card-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.rank-main h2 a:hover,
.category-card h2 a:hover {
  color: #1d4ed8;
}

.movie-card p {
  min-height: 46px;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
}

.movie-card.compact p {
  min-height: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 90px;
  padding: 20px;
  border-radius: 26px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ranking-head a {
  color: #67e8f9;
}

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

.strip-item {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.strip-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.strip-item span:last-child {
  font-weight: 800;
  line-height: 1.35;
}

.rank-num {
  color: #67e8f9;
  font-weight: 950;
}

.page-hero,
.detail-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 54%, #ffffff 100%);
  border-bottom: 1px solid #dbeafe;
}

.page-hero > div,
.detail-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 22px;
}

.page-hero p,
.eyebrow {
  margin: 0 0 10px;
  color: #2563eb;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 14px;
  color: #475569;
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: #64748b;
  font-weight: 800;
}

.crumbs a {
  color: #1d4ed8;
}

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

.category-card {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-covers img {
  height: 112px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  transition: transform 0.25s ease;
}

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

.category-card p {
  color: #64748b;
}

.related-cats > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-cats a {
  padding: 9px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 88px 70px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-cover img {
  width: 88px;
  height: 116px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.rank-index {
  font-size: 26px;
  font-weight: 950;
  color: #1d4ed8;
}

.rank-main h2 {
  margin: 0;
  font-size: 21px;
}

.rank-main p {
  margin: 6px 0 0;
  color: #64748b;
}

.rank-side {
  text-align: right;
}

.rank-side strong {
  display: block;
  color: #1d4ed8;
  font-size: 26px;
}

.rank-side span {
  color: #64748b;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  color: #475569;
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: #1e40af;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.tag-row.large span {
  min-height: 32px;
  padding-inline: 13px;
}

.detail-actions .primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.player-section {
  padding-top: 46px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.player-shell::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

.play-layer.hidden {
  display: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.35);
  font-size: 28px;
}

.play-layer span:last-child {
  font-size: 18px;
  font-weight: 950;
}

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

.detail-text {
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.empty-state {
  padding: 34px;
  text-align: center;
  border-radius: 22px;
  background: #fff;
  color: #64748b;
  font-weight: 900;
  border: 1px dashed #cbd5e1;
}

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

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 22px 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
}

.footer-grid p {
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

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

.footer-bottom p {
  margin: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-nav {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 0 18px;
  }

  .site-header.open .nav-links {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
  }

  .nav-link::after {
    display: none;
  }

  .hero-inner {
    min-height: auto;
    padding: 44px 18px 74px;
  }

  .hero-slide,
  .detail-grid,
  .category-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

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

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-dots {
    left: 18px;
    bottom: 28px;
  }

  .search-form,
  .filter-panel,
  .category-list {
    grid-template-columns: 1fr;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .movie-card p {
    display: none;
  }

  .rank-side {
    text-align: left;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

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