:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --orange: #f97316;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.24);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand {
  color: #ffffff;
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  font-size: 14px;
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fde68a;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #ffffff;
  background: linear-gradient(110deg, #0d9488 0%, #0891b2 48%, #2563eb 100%);
}

.hero-light {
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.24;
  pointer-events: none;
}

.hero-light-left {
  width: 340px;
  height: 340px;
  left: 6%;
  top: 42px;
  background: #ffffff;
}

.hero-light-right {
  width: 420px;
  height: 420px;
  right: 5%;
  bottom: 22px;
  background: #fbbf24;
}

.hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 82px 20px 64px;
}

.hero-slider {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-tags,
.detail-meta,
.card-meta,
.hero-actions,
.page-hero-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.tag {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
}

.hero-actions,
.page-hero-actions {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.27);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster-label {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.70);
  font-weight: 800;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

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

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

.hero-category-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-category-strip a {
  padding: 12px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px;
}

.search-section {
  padding-top: 42px;
  padding-bottom: 20px;
}

.search-panel,
.local-filter,
.text-card,
.side-card,
.player-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.search-panel {
  padding: 24px;
}

.search-panel label,
.local-filter label {
  display: block;
  margin-bottom: 12px;
  color: var(--slate-800);
  font-weight: 900;
  font-size: 20px;
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-row input,
.local-filter input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--slate-800);
  background: #f8fafc;
  outline: none;
}

.search-row input:focus,
.local-filter input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.search-row button {
  min-width: 94px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  cursor: pointer;
  font-weight: 800;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.search-card {
  overflow: hidden;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.search-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.search-card div {
  padding: 12px;
}

.search-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--slate-800);
}

.search-card span {
  color: var(--slate-500);
  font-size: 13px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-more {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.72));
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-badge,
.rank-badge,
.view-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
}

.card-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: #dc2626;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.view-pill {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.7);
}

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

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

.movie-card h3 a:hover {
  color: var(--teal);
}

.card-meta {
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-meta span + span::before {
  content: "";
}

.card-genre {
  margin: 8px 0 0;
  color: var(--teal);
  font-weight: 800;
  font-size: 14px;
}

.card-desc {
  margin: 8px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-500);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan) 55%, var(--blue));
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-glow {
  position: absolute;
  width: 130px;
  height: 130px;
  right: -28px;
  top: -28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

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

.category-tile strong {
  font-size: 24px;
  margin-bottom: 10px;
}

.category-tile span {
  color: #dbeafe;
}

.category-tile em {
  margin-top: 14px;
  color: #fef3c7;
  font-style: normal;
  font-weight: 800;
}

.ranking-preview {
  padding-bottom: 72px;
}

.ranking-list {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.ranking-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--slate-200);
  transition: background 0.2s ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

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

.ranking-row span {
  color: var(--orange);
  font-weight: 900;
}

.ranking-row strong {
  color: var(--slate-800);
}

.ranking-row em {
  color: var(--slate-500);
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #ffffff;
  background: linear-gradient(100deg, var(--teal), var(--cyan), var(--blue));
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: 7%;
  top: -120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(26px);
}

.page-hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 20px;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
}

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

.breadcrumb,
.breadcrumb-row a,
.breadcrumb-row span {
  color: #fef3c7;
  font-weight: 800;
}

.local-filter {
  padding: 22px;
}

.detail-hero {
  min-height: 520px;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.15);
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(251, 191, 36, 0.25), transparent 40%);
}

.detail-hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 20px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

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

.detail-headline h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
}

.detail-headline p {
  max-width: 840px;
  margin: 0 0 20px;
  color: #e0f2fe;
  font-size: 20px;
}

.breadcrumb-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tag-row {
  margin-top: 18px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card {
  padding: 14px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  font-size: 30px;
  transform: scale(1);
  transition: transform 0.2s ease;
}

.player-overlay:hover .player-button {
  transform: scale(1.08);
}

.text-card,
.side-card {
  padding: 26px;
}

.text-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--slate-800);
  font-size: 24px;
}

.text-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--slate-500);
}

.side-card dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 800;
}

.side-card a {
  color: var(--teal);
}

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

.compact-rank a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.compact-rank strong,
.compact-rank span {
  display: block;
}

.compact-rank span {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 13px;
}

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

.movie-card.is-hidden {
  display: none;
}

.empty-filter {
  padding: 18px;
  border-radius: 16px;
  color: var(--slate-500);
  background: #ffffff;
  border: 1px dashed var(--slate-200);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 20px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
}

.footer-brand .brand-mark {
  color: var(--teal);
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p {
  margin: 0;
}

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

.footer-grid a:hover {
  color: #2dd4bf;
}

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

.footer-bottom p {
  margin: 0;
}

@media (max-width: 1080px) {
  .movie-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-slide {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 54px;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .movie-grid,
  .featured-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .ranking-row {
    grid-template-columns: 72px 1fr;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

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

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

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

@media (max-width: 540px) {
  .header-inner {
    padding: 0 14px;
  }

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

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-slider {
    min-height: 700px;
  }

  .hero-actions,
  .page-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    min-height: 48px;
  }

  .content-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-hero-inner,
  .detail-hero-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

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