:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --yellow: #facc15;
  --slate: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #eff6ff;
  --card: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 50%, #f0fdfa 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.26);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #1e3a8a;
  background: linear-gradient(135deg, #fde047, #ffffff);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.nav-links a {
  opacity: 0.94;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fef08a;
  opacity: 1;
}

.site-search {
  width: min(330px, 32vw);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.14);
}

.site-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #0f172a;
  padding: 11px 14px;
}

.site-search button {
  border: 0;
  cursor: pointer;
  padding: 11px 15px;
  color: #1d4ed8;
  font-weight: 800;
  background: var(--yellow);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-size: 28px;
  background: transparent;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #1d4ed8, #0891b2 55%, #0f766e);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.3;
  pointer-events: none;
}

.hero::before {
  top: 36px;
  left: 7%;
  background: #ffffff;
}

.hero::after {
  right: 6%;
  bottom: -120px;
  background: #facc15;
}

.hero-shell {
  position: relative;
  z-index: 1;
  min-height: 610px;
  display: grid;
  align-items: center;
  padding: 70px 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  gap: 48px;
  align-items: center;
  position: absolute;
  inset: 70px 0;
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fef9c3;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.hero p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-meta,
.detail-meta,
.card-meta,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag,
.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.tag.alt,
.card-meta span:nth-child(2),
.detail-meta span:nth-child(2) {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.tag.hot {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #1e3a8a;
  background: var(--yellow);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.28);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 360px;
  box-shadow: 0 36px 80px rgba(15, 23, 42, 0.34);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-slide:hover .hero-poster img {
  transform: scale(1.05);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
}

.hero-poster-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #1e40af;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.hero-control.prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 58px));
}

.hero-control.next {
  right: max(18px, calc((100vw - 1180px) / 2 - 58px));
}

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

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

.hero-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.section {
  padding: 58px 0;
}

.section.tinted {
  background: linear-gradient(90deg, rgba(254, 215, 170, 0.55), rgba(254, 202, 202, 0.45));
}

.section.green {
  background: linear-gradient(90deg, rgba(187, 247, 208, 0.55), rgba(153, 246, 228, 0.45));
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  color: #111827;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.info-card,
.rank-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 9px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-8px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
}

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

.movie-card:hover .poster img,
.rank-card:hover .poster img {
  transform: scale(1.08);
}

.poster::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-size: 26px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.75);
}

.card-body {
  padding: 16px;
}

.movie-card h3,
.rank-card h3,
.category-card h3 {
  margin: 11px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

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

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

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

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

.featured-card .poster {
  aspect-ratio: 4 / 3;
}

.featured-card .card-body {
  position: relative;
  color: #ffffff;
  margin-top: -96px;
  min-height: 96px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.featured-card h3,
.featured-card p {
  color: #ffffff;
}

.category-card {
  min-height: 190px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.category-card h3 {
  margin-top: 0;
  font-size: 22px;
}

.category-card .sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-card .sample-links span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  background: #cffafe;
}

.catalog-hero,
.detail-hero {
  padding: 46px 0;
  color: #ffffff;
  background: linear-gradient(120deg, #2563eb, #0891b2, #0f766e);
}

.catalog-hero h1,
.detail-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
}

.catalog-hero p,
.detail-hero p {
  max-width: 840px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #e0f2fe;
  font-weight: 800;
}

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

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 9px 15px;
  color: #334155;
  font-weight: 900;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}

.filter-chips button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, #0891b2, #2563eb);
}

.local-search {
  width: min(320px, 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  outline: 0;
  padding: 10px 14px;
  background: #ffffff;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 210px minmax(0, 1fr);
  align-items: center;
}

.rank-number {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 126px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-card .poster {
  width: 210px;
  height: 126px;
  aspect-ratio: auto;
}

.rank-card .card-body {
  padding: 18px 20px;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.65));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.play-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #1d4ed8;
  background: #ffffff;
}

.info-card {
  padding: 22px;
}

.info-card h2,
.info-card h3 {
  margin: 0 0 12px;
  color: #111827;
}

.info-card p {
  margin: 0 0 14px;
  color: #475569;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

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

.no-results {
  display: none;
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  margin-top: 70px;
  padding: 44px 0;
  color: #e5e7eb;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 26px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 12px;
  color: #67e8f9;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links,
  .header-inner .site-search {
    display: none;
    width: 100%;
  }

  .nav-links.is-open,
  .header-inner .site-search.is-open {
    display: flex;
  }

  .nav-links.is-open {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0 4px;
  }

  .header-inner .site-search.is-open {
    max-width: none;
  }

  .hero-shell {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-poster {
    transform: none;
  }

  .grid.cards,
  .grid.featured,
  .grid.categories,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .logo {
    font-size: 20px;
  }

  .hero-shell {
    padding: 42px 0 72px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

  .section-head,
  .catalog-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.cards,
  .grid.featured,
  .grid.categories,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    min-height: 92px;
    font-size: 20px;
  }

  .rank-card .poster {
    width: 112px;
    height: 92px;
  }

  .rank-card .card-body {
    padding: 12px;
  }

  .rank-card p {
    display: none;
  }
}
