:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --soft: #e2e8f0;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.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.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.brand span:last-child {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.25);
}

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

.desktop-nav a,
.mobile-panel a {
  padding: 9px 13px;
  color: #334155;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan-dark);
  background: #ecfeff;
}

.header-search,
.mobile-search,
.hero-search,
.toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.toolbar-search input {
  width: 260px;
  height: 42px;
  padding: 0 16px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.toolbar-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-btn,
.secondary-btn,
.play-button,
.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.play-button:hover,
.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.26);
}

.secondary-btn {
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(8, 145, 178, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: #f1f5f9;
  border: 0;
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.mobile-panel nav {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

main {
  min-height: 60vh;
}

.hero-section {
  padding: 34px 0 42px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.35), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #123c5a 46%, #075985 100%);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 38px;
  padding: 56px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.hero-search {
  max-width: 620px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 180px;
  border-color: transparent;
}

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

.hero-tags a,
.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--cyan-dark);
  background: #ecfeff;
  border: 1px solid #cffafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a,
.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-art {
  position: relative;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 26px -12px -18px 36px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.45), rgba(37, 99, 235, 0.28));
  border-radius: 34px;
  filter: blur(10px);
}

.hero-art img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.hero-info-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(82%, 320px);
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  backdrop-filter: blur(14px);
}

.hero-info-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.hero-info-card span {
  color: #bae6fd;
  font-size: 14px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--cyan-dark);
  background: rgba(255, 255, 255, 0.88);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 34px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

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

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

.section-block {
  padding: 42px 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

.section-title span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 14px;
}

.section-lead {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.view-more {
  color: var(--cyan-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(8, 145, 178, 0.28);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.14);
  transform: translateY(-6px);
}

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

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

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

.poster-type {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-meta,
.score-row,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.28;
}

.card-body h3 a:hover,
.breadcrumbs a:hover,
.text-link:hover {
  color: var(--cyan-dark);
}

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

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

.score-row {
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0e7490, #2563eb);
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.18);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0 0 18px;
  color: #dff7ff;
  font-size: 14px;
}

.category-tile span {
  position: relative;
  font-weight: 800;
}

.ranking-panel {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.ranking-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li + li {
  border-top: 1px solid #edf2f7;
}

.ranking-item {
  display: grid;
  grid-template-columns: 58px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: #f8fafc;
}

.rank-number {
  color: var(--cyan-dark);
  font-size: 24px;
  font-weight: 900;
}

.ranking-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.ranking-title strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 18px;
}

.ranking-title span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--cyan-dark);
  font-weight: 900;
}

.page-hero {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.32), transparent 32%),
    linear-gradient(135deg, #0f172a, #164e63 52%, #0e7490);
}

.page-hero .container {
  display: grid;
  gap: 16px;
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumbs {
  color: #bae6fd;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.toolbar select {
  height: 42px;
  padding: 0 36px 0 14px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  outline: none;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.82));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-overlay-content {
  text-align: center;
}

.play-button {
  width: 82px;
  height: 82px;
  padding: 0;
  font-size: 32px;
}

.player-overlay h2 {
  margin: 16px 0 0;
  color: #ffffff;
  font-size: 24px;
}

.detail-panel,
.aside-panel,
.content-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.detail-panel {
  padding: 24px;
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
}

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

.detail-tags {
  margin: 16px 0 22px;
}

.detail-section h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #334155;
}

.aside-panel {
  padding: 18px;
}

.aside-poster {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  border-radius: 22px;
}

.aside-panel h2 {
  margin: 18px 0 12px;
  font-size: 22px;
}

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

.mini-movie {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-movie:hover {
  background: #ecfeff;
  transform: translateY(-2px);
}

.mini-movie img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
}

.mini-movie strong,
.mini-movie em {
  display: block;
}

.mini-movie strong {
  line-height: 1.35;
}

.mini-movie em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.related-section {
  margin-top: 28px;
}

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

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

.site-footer {
  margin-top: 58px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #94a3b8;
}

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

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

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 42px;
  }

  .hero-art {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-section {
    padding-top: 18px;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 22px 76px;
  }

  .hero-search {
    align-items: stretch;
    flex-direction: column;
    border-radius: 26px;
  }

  .hero-search input,
  .hero-search button,
  .toolbar-search input,
  .toolbar-search button,
  .mobile-search input,
  .mobile-search button {
    width: 100%;
  }

  .hero-control {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .hero-control.prev {
    left: 18px;
  }

  .hero-control.next {
    right: 18px;
  }

  .hero-dots {
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
  }

  .section-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ranking-item {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 58px;
    height: 78px;
  }

  .rank-score {
    grid-column: 3;
  }

  .player-shell,
  .detail-panel,
  .aside-panel {
    border-radius: 22px;
  }

  .detail-panel {
    padding: 18px;
  }
}
