:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-soft: #ccfbf1;
  --gold: #f59e0b;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.96), rgba(15, 118, 110, 0.98));
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.22);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.15rem;
}

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

.nav-link,
.header-search,
.dropdown-button {
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.header-search:hover,
.dropdown-button:hover {
  color: #fff7ad;
  background: rgba(255, 255, 255, 0.12);
}

.header-search {
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

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

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.24), transparent 24%), linear-gradient(135deg, #0f766e, #0f172a 72%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 650px;
  padding: 64px 0 96px;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 42px;
  min-height: 500px;
}

.hero-slide.is-active {
  display: grid;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  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: #134e4a;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
  position: relative;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5.35;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.78));
}

.hero-panel {
  position: absolute;
  right: -18px;
  bottom: 30px;
  width: min(260px, 74%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.4rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  opacity: 0.52;
}

.hero-dot.is-active {
  width: 42px;
  opacity: 1;
  background: #f59e0b;
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.hero-rail a {
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-rail strong,
.hero-rail span {
  display: block;
}

.hero-rail strong {
  margin-bottom: 8px;
}

.hero-rail span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.main-content {
  padding: 56px 0 72px;
}

.page-hero {
  padding: 58px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #fef3c7;
}

.section-block {
  margin-bottom: 58px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #111827);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(15, 23, 42, 0.78));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  color: #134e4a;
  background: #fef3c7;
}

.rank-badge {
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: block;
  color: #0f172a;
  font-weight: 800;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-title:hover {
  color: var(--teal);
}

.movie-meta,
.movie-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.movie-desc {
  min-height: 44px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 20px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #111827);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.05);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.82));
}

.category-tile span,
.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile strong {
  margin-top: 74px;
  font-size: 1.35rem;
}

.category-tile span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile em {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  line-height: 1.55;
}

.panel-section {
  padding: 30px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

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

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

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.11);
}

.rank-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

.small-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  font-weight: 900;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.search-input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.search-input {
  flex: 1 1 260px;
}

.search-input:focus,
.filter-panel select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 118, 110, 0.72)), linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.68));
  backdrop-filter: blur(12px);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 34px;
  padding: 58px 0;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.detail-copy p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

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

.watch-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.25);
}

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

.watch-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.32), rgba(2, 6, 23, 0.72)), rgba(2, 6, 23, 0.28);
  cursor: pointer;
}

.watch-box.is-playing .watch-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.watch-overlay span,
.watch-overlay strong {
  display: block;
  text-align: center;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 999px;
  color: #134e4a;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.26);
  font-size: 2rem;
}

.detail-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.detail-panel h2 {
  margin: 0 0 14px;
}

.detail-panel p {
  color: #475569;
  line-height: 1.82;
}

.detail-panel + .detail-panel {
  margin-top: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.compact-card .movie-card-body {
  padding: 12px;
}

.compact-card .movie-title {
  font-size: 0.96rem;
}

.compact-card .movie-desc,
.compact-card .tag-row {
  display: none;
}

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

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

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

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

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

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
}

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

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

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

.footer-links.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

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

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

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

  .hero-rail {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .mobile-menu-button {
    display: block;
  }

  body.nav-open .mobile-nav {
    display: grid;
    gap: 4px;
  }

  .hero-inner {
    min-height: auto;
    padding: 44px 0 64px;
  }

  .hero-slide.is-active,
  .detail-hero-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-rail {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

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

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

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

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .search-page-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    border-radius: 20px;
  }

  .search-input,
  .filter-panel select {
    width: 100%;
  }
}
