* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: linear-gradient(90deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.25);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #0ea5e9;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.brand-text {
  font-size: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link,
.nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover > button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 184px;
  padding: 10px;
  display: grid;
  gap: 4px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.22);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 10px 12px;
  color: #334155;
  border-radius: 12px;
}

.dropdown-panel a:hover {
  color: #0284c7;
  background: #e0f2fe;
}

.top-search {
  display: flex;
  align-items: center;
  width: 300px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  overflow: hidden;
}

.top-search input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 14px;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.top-search button {
  height: 38px;
  padding: 0 16px;
  color: #0f172a;
  border: 0;
  background: #ffffff;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  border: 0;
  background: transparent;
  font-size: 26px;
}

main {
  width: 100%;
}

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

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

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.25)), linear-gradient(0deg, #020617, transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 80px 0;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #dff5ff;
  background: rgba(14, 165, 233, 0.24);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

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

.hero-panel {
  position: relative;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-tags span {
  padding: 7px 10px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

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

.section-header h1,
.section-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-header p {
  margin: 8px 0 0;
  max-width: 760px;
  color: #64748b;
  line-height: 1.75;
}

.more-link {
  flex: 0 0 auto;
  color: #0284c7;
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 65%);
  transition: opacity 0.25s ease;
}

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

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #ffffff;
  opacity: 0;
  background: #0ea5e9;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  transition: all 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  padding: 0 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 20px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
}

.meta-row a,
.meta-row span {
  padding: 5px 9px;
  background: #f1f5f9;
  border-radius: 999px;
}

.meta-row a {
  color: #0284c7;
  background: #e0f2fe;
  font-weight: 700;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 8px;
  color: #0369a1;
  background: #f0f9ff;
  border-radius: 999px;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-radius: 28px;
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.22);
  transition: transform 0.25s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

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

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

.category-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.65;
}

.feature-band {
  padding: 40px;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border-radius: 34px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scrollbar-width: thin;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(6px);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.13);
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: #0ea5e9;
  border-radius: 14px;
  font-weight: 800;
}

.rank-row strong {
  color: #0f172a;
  font-size: 18px;
}

.rank-row em {
  color: #64748b;
  font-style: normal;
}

.filter-box {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.filter-box input,
.filter-box select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: #0f172a;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  outline: 0;
  background: #f8fafc;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px auto 0;
  width: min(1280px, calc(100% - 32px));
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0284c7;
}

.detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.player-card,
.detail-card,
.side-card {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.64);
  border: 0;
  cursor: pointer;
}

.player-cover.hidden {
  display: none;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border-radius: 50%;
  box-shadow: 0 20px 42px rgba(14, 165, 233, 0.32);
  font-size: 30px;
}

.player-message {
  display: none;
  padding: 14px 18px;
  color: #ffffff;
  background: #0f172a;
}

.player-message.show {
  display: block;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.detail-meta span,
.detail-meta a {
  padding: 8px 12px;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 14px;
}

.detail-meta a {
  color: #0284c7;
  background: #e0f2fe;
  font-weight: 700;
}

.lead-text {
  padding: 18px;
  margin: 0 0 22px;
  color: #075985;
  background: #f0f9ff;
  border-left: 5px solid #0ea5e9;
  border-radius: 0 18px 18px 0;
  font-size: 18px;
  line-height: 1.8;
}

.text-block {
  margin-top: 24px;
}

.text-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.text-block h2::before {
  content: "";
  width: 6px;
  height: 26px;
  background: #0ea5e9;
  border-radius: 999px;
}

.text-block p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
  position: sticky;
  top: 92px;
}

.side-card h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 22px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 118px;
  height: 74px;
  object-fit: cover;
  border-radius: 16px;
}

.side-item strong {
  display: block;
  color: #0f172a;
  line-height: 1.45;
}

.side-item span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

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

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

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
}

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

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

.empty-state {
  display: none;
  padding: 30px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border-radius: 22px;
}

@media (max-width: 1024px) {
  .top-search {
    display: none;
  }

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding: 10px 0;
  }

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

  .nav-link,
  .nav-dropdown > button {
    justify-content: flex-start;
    height: 42px;
  }

  .nav-dropdown {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 54px 0 88px;
  }

  .hero-panel {
    max-width: 420px;
  }

  .hero-controls {
    right: 18px;
    bottom: 20px;
  }

  .hero-dots {
    left: 18px;
    transform: none;
  }

  .section-header {
    display: block;
  }

  .more-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

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

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

  .feature-band {
    padding: 22px;
  }

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

  .rank-row em {
    grid-column: 2;
  }

  .side-item {
    grid-template-columns: 96px 1fr;
  }

  .side-item img {
    width: 96px;
    height: 62px;
  }
}
