:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --blue: #2563eb;
  --indigo: #4338ca;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sky);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.menu-button {
  display: none;
  border: 0;
  color: var(--sky);
  background: transparent;
  font-size: 26px;
}

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

.nav-links > a,
.nav-dropdown > button {
  color: #374151;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.nav-links > a:hover,
.nav-links > a.active,
.nav-dropdown > button:hover {
  color: var(--sky);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: 38px;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 2px;
  visibility: hidden;
  opacity: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  visibility: visible;
  opacity: 1;
}

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

.dropdown-panel a:hover {
  color: var(--sky);
  background: #f0f9ff;
}

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

.nav-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  outline: none;
}

.nav-search input {
  width: 230px;
  padding: 9px 14px;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.nav-search button,
.btn,
.section-more,
.page-link,
.play-button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-search button {
  padding: 9px 16px;
  color: #fff;
  background: var(--sky);
}

.nav-search button:hover,
.btn:hover,
.section-more:hover,
.page-link:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--sky), var(--blue), var(--indigo));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 46px;
  color: #fff;
}

.hero-kicker {
  margin: 0 0 14px;
  color: #dbeafe;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.12;
}

.hero h2 {
  margin: 0 0 14px;
  color: #fef3c7;
  font-size: clamp(26px, 4vw, 42px);
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e0f2fe;
  font-size: 20px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
}

.btn.primary {
  color: var(--sky-dark);
  background: #fff;
  box-shadow: 0 16px 28px rgba(255, 255, 255, 0.18);
}

.btn.ghost {
  color: #fff;
  border: 2px solid #fff;
}

.btn.line {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.36);
  transform: rotate(2deg);
}

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

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

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

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: #fff;
}

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

.content-section {
  margin: 0 0 54px;
}

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

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

.section-head p,
.page-head p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-more,
.page-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  color: #fff;
  background: var(--sky);
}

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #bae6fd, #c7d2fe);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #fff;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--sky);
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--sky);
}

.card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
}

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

.category-card {
  min-height: 158px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--sky), var(--blue), var(--indigo));
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  margin: 0;
  color: #e0f2fe;
}

.filter-panel {
  margin: 0 0 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 170px 170px 170px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 15px;
}

.filter-empty {
  display: none;
  padding: 18px;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-num {
  color: var(--sky);
  font-size: 26px;
  font-weight: 900;
}

.rank-item img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.breadcrumb {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.breadcrumb a:hover {
  color: var(--sky);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-position: center;
  background-size: cover;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(2, 132, 199, 0.52));
}

.play-button {
  position: relative;
  z-index: 2;
  padding: 15px 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.3);
}

.player-box.is-playing .player-cover {
  display: none;
}

.detail-title {
  margin: 24px 0;
  padding: 26px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 999px;
  font-weight: 700;
}

.detail-article {
  padding: 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 22px;
  color: #374151;
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 18px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
}

.related-list a:hover {
  background: #f0f9ff;
}

.related-list img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.related-list strong {
  display: block;
  margin-bottom: 4px;
}

.related-list span {
  color: var(--muted);
  font-size: 13px;
}

.search-result-note {
  margin: 0 0 18px;
  color: var(--muted);
}

.site-footer {
  background: #0f172a;
  color: #dbeafe;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.copyright {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .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;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 900px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .dropdown-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    display: none;
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  .nav-dropdown:hover .dropdown-panel,
  .nav-dropdown:focus-within .dropdown-panel {
    display: grid;
  }

  .nav-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-content {
    height: auto;
    min-height: 600px;
    padding: 74px 0 88px;
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

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

@media (max-width: 640px) {
  .main-wrap {
    padding-top: 30px;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p {
    min-height: auto;
    font-size: 13px;
  }

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

  .rank-item {
    grid-template-columns: 50px 70px minmax(0, 1fr);
  }

  .rank-item .page-link {
    grid-column: 1 / -1;
    justify-content: center;
  }

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

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