:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #075985;
  --cyan: #06b6d4;
  --accent: #f97316;
  --footer: #0f172a;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 42%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

.logo-text {
  font-size: 22px;
  color: #0f172a;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-dark);
  background: #e0f2fe;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
}

.main {
  min-height: 66vh;
}

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

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.08);
}

.hero-layer {
  background: radial-gradient(circle at 70% 35%, rgba(6, 182, 212, 0.28), transparent 30%), linear-gradient(90deg, rgba(7, 89, 133, 0.96), rgba(14, 116, 144, 0.72) 46%, rgba(15, 23, 42, 0.52) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 90px 0 110px;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1 {
  max-width: 820px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.movie-card-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #cffafe;
  background: rgba(8, 47, 73, 0.42);
  border: 1px solid rgba(207, 250, 254, 0.24);
}

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

.button-primary,
.button-secondary,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  min-height: 52px;
  padding: 0 24px;
  color: #075985;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(8, 47, 73, 0.28);
}

.button-secondary {
  min-height: 52px;
  padding: 0 24px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.small-button {
  min-height: 38px;
  padding: 0 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.button-primary:hover,
.button-secondary:hover,
.small-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

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

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

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

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

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

.section.compact {
  padding-top: 42px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #075985;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.movie-card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-tags span,
.detail-tags span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #ffffff;
  background: #075985;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card img,
.category-card-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card-layer {
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.16), rgba(8, 47, 73, 0.88));
}

.category-card-content {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  gap: 8px;
}

.category-card strong {
  font-size: 24px;
}

.category-card em {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-weight: 900;
}

.rank-item img {
  width: 74px;
  height: 98px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 17px;
}

.rank-info span,
.rank-info p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 34%), linear-gradient(135deg, #eff6ff, #ffffff 58%, #f0fdfa);
  border-bottom: 1px solid #e2e8f0;
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 58px;
}

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

.breadcrumb span {
  color: var(--muted);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  outline: 0;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  font-weight: 700;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

.empty-state {
  display: none;
  padding: 42px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

.detail-hero {
  color: #ffffff;
  background: #082f49;
}

.detail-hero-inner {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

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

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

.detail-shade {
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.96), rgba(15, 23, 42, 0.76));
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
  padding: 54px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #e0f2fe;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

.detail-title h1 {
  color: #ffffff;
}

.detail-title p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.24), rgba(2, 6, 23, 0.52));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #075985;
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 20px 54px rgba(14, 165, 233, 0.35);
}

.content-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-panel,
.side-panel {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.article-panel {
  padding: 28px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.article-panel p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.side-panel {
  padding: 18px;
}

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

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

.side-card img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.side-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  margin-top: 86px;
  color: #cbd5e1;
  background: var(--footer);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0;
}

.footer-logo {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 24px;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  text-align: center;
}

.hidden-card {
  display: none;
}

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

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

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

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

  .menu-button {
    display: flex;
  }

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

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

  .hero-control {
    display: none;
  }

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

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

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

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

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

  .detail-poster {
    width: min(260px, 72vw);
  }

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