:root {
  color-scheme: light;
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --panel: #ffffff;
  --slate: #0f172a;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.28);
}

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

.nav-links a {
  color: #cbd5e1;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 15px;
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.75);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.8);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 99px;
  content: "";
}

.menu-toggle span::before {
  transform: translateY(-7px);
}

.menu-toggle span::after {
  transform: translateY(5px);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #1e293b;
}

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

.mobile-menu a {
  display: block;
  color: #cbd5e1;
  padding: 13px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.main-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #020617;
  margin-bottom: 64px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 900ms ease;
}

.hero-slide.is-active img {
  transform: scale(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.12) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 48%);
}

.hero-content {
  position: absolute;
  inset: auto auto 72px 64px;
  width: min(640px, calc(100% - 96px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.34);
  color: #a5f3fc;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

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

.hero-meta {
  margin-bottom: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  line-height: 1;
}

.hero-meta .pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-controls {
  position: absolute;
  right: 34px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.section {
  margin-bottom: 58px;
}

.section-soft {
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: #0891b2;
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.38);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.card-poster::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0;
  transition: opacity 220ms ease;
  content: "";
}

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: 220ms ease;
  backdrop-filter: blur(14px);
}

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

.card-body {
  padding: 15px 16px 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.rank-cover {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  min-height: 164px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.45), transparent 42%), linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: var(--shadow);
  transition: transform 200ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.page-title,
.detail-hero {
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

.breadcrumbs a {
  color: #0891b2;
  font-weight: 700;
}

.filter-bar {
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.search-box {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
  background: #ffffff;
  transition: 180ms ease;
}

.search-box:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 14px;
  color: #475569;
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #ffffff;
  border-color: #06b6d4;
  background: #0891b2;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  text-align: center;
}

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

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 5;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  font-size: 28px;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 6;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.86);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.detail-card p {
  margin: 0 0 16px;
  color: #475569;
  line-height: 1.8;
}

.detail-cover {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 18px;
  background: #0f172a;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

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

.site-footer {
  padding: 46px 0 34px;
  color: #94a3b8;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-inner p,
.footer-inner li {
  color: #94a3b8;
  line-height: 1.8;
  font-size: 14px;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-inner a:hover {
  color: #22d3ee;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

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

  .rank-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-wrap {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .hero-slider {
    min-height: 540px;
    border-radius: 24px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 84px;
    width: auto;
  }

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

  .hero-dots {
    left: 22px;
  }

  .hero-controls {
    right: 22px;
  }

  .section-soft,
  .page-title,
  .detail-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 96px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 19px;
  }

  .hero-slider {
    min-height: 500px;
  }

  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .card-body p {
    min-height: auto;
  }
}
