* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 30%, #f9fafb 100%);
  min-height: 100vh;
}

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.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.26);
  transition: transform 0.3s ease;
}

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

.logo-text,
.footer-logo span:last-child {
  font-size: 21px;
  background: linear-gradient(90deg, #0284c7, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0284c7;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #f3f4f6;
  padding: 12px 18px 18px;
  background: #ffffff;
  animation: fade-in 0.25s ease;
}

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

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #374151;
  font-weight: 650;
}

.mobile-link.active {
  color: #0284c7;
}

.mobile-category-title {
  margin-top: 8px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
}

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

.mobile-category-grid a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #374151;
  background: #f9fafb;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.48) 46%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.24) 55%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  width: min(680px, calc(100% - 48px));
  color: #ffffff;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
}

.hero-kicker {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 620px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

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

.primary-btn,
.quick-search-box button {
  color: #ffffff;
  background: #0ea5e9;
  box-shadow: 0 18px 32px rgba(14, 165, 233, 0.28);
}

.primary-btn:hover,
.quick-search-box button:hover {
  transform: translateY(-2px);
  background: #0284c7;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.35);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 42px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.quick-search-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(224, 242, 254, 0.8);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
}

.quick-search-inner h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.quick-search-box {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.quick-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 16px;
  color: #111827;
}

.section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section.tinted {
  width: 100%;
  max-width: none;
  padding: 70px max(16px, calc((100vw - 1280px) / 2 + 16px));
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 8px 0 0;
  color: #6b7280;
  line-height: 1.7;
}

.section-link {
  color: #0284c7;
  font-weight: 800;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

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

.cover-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.05));
  transition: opacity 0.3s ease;
}

.movie-card:hover .cover-gradient {
  opacity: 1;
}

.play-circle {
  position: absolute;
  inset: 0;
  width: 64px;
  height: 64px;
  margin: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.movie-card:hover .play-circle {
  opacity: 1;
  transform: scale(1);
}

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

.card-body {
  display: block;
  padding: 16px;
}

.card-body strong {
  min-height: 54px;
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #0284c7;
}

.card-body p {
  min-height: 48px;
  margin: 8px 0 14px;
  display: -webkit-box;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.card-meta span:first-child {
  padding: 5px 8px;
  border-radius: 8px;
  color: #0369a1;
  background: #e0f2fe;
}

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

.category-card,
.category-overview-card {
  display: block;
  min-height: 180px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  border: 1px solid #e0f2fe;
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(14, 165, 233, 0.18);
}

.category-card span,
.category-overview-body strong {
  display: block;
  margin-bottom: 12px;
  color: #0284c7;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong,
.category-overview-body em {
  color: #4b5563;
  font-style: normal;
  line-height: 1.8;
}

.category-overview-card {
  padding: 0;
  overflow: hidden;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  overflow: hidden;
}

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

.category-overview-body {
  display: block;
  padding: 20px;
}

.page-hero {
  padding: 80px 0 46px;
  background: linear-gradient(135deg, #e0f2fe, #eff6ff 45%, #ffffff);
  border-bottom: 1px solid #e0f2fe;
}

.page-hero-inner {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

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

.page-hero p {
  max-width: 760px;
  margin: 18px auto 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 170px;
  gap: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  padding: 0 14px;
  color: #111827;
  background: #f9fafb;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.category-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 28px;
}

.category-filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #374151;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.category-filter-buttons button.active {
  color: #ffffff;
  background: #0ea5e9;
}

.empty-state {
  display: none;
  margin: 28px auto 0;
  padding: 28px;
  text-align: center;
  color: #6b7280;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
  color: #ffffff;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(0.55);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.35));
}

.detail-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
  background: #0f172a;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
}

.detail-main {
  padding-top: 46px;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.22);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #0284c7;
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 30px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.3);
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.content-card {
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

.compact-grid .card-cover {
  height: 220px;
}

.compact-grid .card-body strong {
  min-height: auto;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-shell p {
  max-width: 420px;
  color: #6b7280;
  line-height: 1.8;
}

.footer-shell h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

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

.footer-shell a {
  color: #6b7280;
}

.footer-shell a:hover {
  color: #0284c7;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  font-size: 14px;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .detail-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

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

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

  .hero {
    height: 74vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 84px;
  }

  .hero-meta span {
    font-size: 13px;
  }

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

  .quick-search-box {
    border-radius: 20px;
    flex-direction: column;
  }

  .quick-search-box input {
    min-height: 44px;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .nav-shell,
  .section,
  .page-hero-inner,
  .detail-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .logo-text {
    font-size: 18px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .section,
  .section.tinted {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-heading {
    display: block;
  }

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

  .card-cover {
    height: 320px;
  }

  .detail-hero {
    min-height: 0;
  }

  .detail-info h1 {
    font-size: 36px;
  }

  .content-card {
    padding: 22px;
  }
}
