:root {
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --rose: #e11d48;
  --amber: #facc15;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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

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

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

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

.narrow-container {
  max-width: 900px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0f172a;
  background: var(--amber);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(250, 204, 21, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
}

.nav-link {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
  opacity: 1;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(320px, 32vw);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.header-search input,
.big-search input,
.filter-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.header-search input {
  color: #ffffff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.header-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  color: #0f172a;
  background: var(--amber);
  font-weight: 800;
}

.header-search button {
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel a {
  display: inline-flex;
  margin: 8px 12px 0 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #061b25;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: 42px;
  width: 100%;
  padding: 0 max(16px, calc((100vw - 1180px) / 2));
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(90deg, rgba(5, 150, 105, 0.94), rgba(8, 145, 178, 0.76), rgba(15, 23, 42, 0.86)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-top: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  color: #0f172a;
  background: var(--amber);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #0f172a;
  background: var(--amber);
  box-shadow: 0 14px 28px rgba(250, 204, 21, 0.22);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  justify-self: end;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

.hero-dots button.active {
  background: var(--amber);
}

.quick-categories,
.content-section {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.section-more,
.text-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

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

.category-pill,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-pill strong {
  font-size: 18px;
}

.category-pill span,
.category-card p,
.card-body p {
  color: var(--muted);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

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

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

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

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  color: #0f172a;
  background: var(--amber);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 14px;
}

.card-meta {
  min-height: 21px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  min-height: 52px;
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.42;
}

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

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

.compact .card-body h3 {
  min-height: auto;
}

.compact .card-body p {
  min-height: 46px;
}

.rank-section {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(8, 145, 178, 0.12));
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 84px 0 70px;
  color: #ffffff;
  background: radial-gradient(circle at 25% 10%, rgba(250, 204, 21, 0.34), transparent 34%), linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
}

.compact-hero,
.category-hero,
.rank-hero,
.search-hero {
  min-height: 320px;
}

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

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

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-preview a {
  padding: 5px 10px;
  color: var(--teal);
  background: #ecfeff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar,
.big-search {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-bar input,
.big-search input {
  height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.big-search button {
  min-width: 110px;
  border-radius: 999px;
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 64px;
  color: #ffffff;
  background: #061b25;
}

.detail-bg {
  position: absolute;
  background-image: linear-gradient(90deg, rgba(5, 150, 105, 0.92), rgba(8, 145, 178, 0.72), rgba(15, 23, 42, 0.9)), var(--detail-image);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}

.detail-meta span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 3px;
}

.watch-section {
  padding: 48px 0;
  background: #0f172a;
}

.watch-section h2 {
  margin: 0 0 18px;
  color: #ffffff;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.player-wrap video,
.watch-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  display: block;
  background: #000000;
}

.watch-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
}

.watch-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  filter: blur(1px) saturate(1.08);
}

.play-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 7px;
  color: #0f172a;
  background: var(--amber);
  border-radius: 999px;
  font-size: 42px;
  box-shadow: 0 20px 45px rgba(250, 204, 21, 0.32);
}

.watch-cover.is-hidden {
  display: none;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.detail-text p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  padding: 34px 0;
  color: #ffffff;
  background: #0f172a;
}

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

.footer-inner p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-links a:hover {
  color: var(--amber);
}

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

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

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

  .mobile-toggle {
    display: block;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 0 72px;
  }

  .hero-poster {
    justify-self: start;
    width: min(280px, 84vw);
  }

  .category-strip,
  .category-overview-grid,
  .detail-layout,
  .detail-meta {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

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

  .card-body p {
    display: none;
  }

  .tag-row {
    display: none;
  }

  .page-hero,
  .detail-hero {
    padding: 52px 0;
  }
}
