:root {
  --green: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --yellow: #fde047;
  --purple: #7c3aed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--green), var(--teal), var(--cyan));
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.28);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
}

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

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #0f766e;
  background: var(--yellow);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
  transform: rotate(10deg) scale(1.04);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
}

.desktop-nav a {
  position: relative;
  padding: 8px 0;
}

.desktop-nav a::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  content: "";
  background: var(--yellow);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #ffffff;
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
  width: 100%;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  padding: 4px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  border: 0;
  border-radius: 999px;
  outline: none;
}

.header-search button {
  padding: 10px 16px;
  margin-left: 6px;
  color: #0f766e;
  font-weight: 800;
  cursor: pointer;
  background: var(--yellow);
  border: 0;
  border-radius: 999px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 14px 24px 22px;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.98), rgba(8, 145, 178, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #ffffff;
  font-weight: 700;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-slide::after {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 52%;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0));
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  color: #022c22;
  font-weight: 800;
  background: var(--yellow);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

.hero p {
  max-width: 640px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #064e3b;
  background: var(--yellow);
  box-shadow: 0 16px 34px rgba(253, 224, 71, 0.28);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: #6d28d9;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  color: #047857;
  font-size: 13px;
  font-weight: 750;
  background: #d1fae5;
  border-radius: 999px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 52px;
  left: max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  border-radius: 99px;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--yellow);
}

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

.section {
  padding: 58px 0;
}

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

.section-kicker {
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.section-head p,
.page-title p,
.detail-title p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: var(--teal);
  font-weight: 850;
  background: #ecfeff;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
}

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

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

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

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

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

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

.movie-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.76));
}

.play-dot {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #064e3b;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: grid;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  place-items: center;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-radius: 12px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

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

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.feature-band {
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 28%), radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.14), transparent 32%);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 26px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0891b2 58%, #7c3aed);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.category-card::after {
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  content: "";
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 9px 14px;
  color: #064e3b;
  font-weight: 850;
  background: var(--yellow);
  border-radius: 999px;
}

.page-hero {
  position: relative;
  padding: 72px 0 48px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #0f766e 52%, #155e75);
}

.page-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 15% 10%, rgba(253, 224, 71, 0.28), transparent 24%), radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 26%);
}

.page-title {
  position: relative;
  z-index: 1;
}

.page-title p {
  color: rgba(255, 255, 255, 0.86);
}

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

.movie-search-input {
  flex: 1 1 280px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
}

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

.filter-chip {
  cursor: pointer;
  border: 0;
}

.filter-chip.is-active {
  color: #ffffff;
  background: var(--teal);
}

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

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 74px 112px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-number {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-radius: 18px;
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

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

.ranking-info h2,
.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  padding: 46px 0 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #022c22, #0f766e 48%, #155e75);
}

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 6px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

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

.detail-title h1 {
  max-width: 900px;
  color: #ffffff;
}

.detail-title p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 13px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.player-section {
  padding: 44px 0;
  background: #020617;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: pointer;
  background: #000000;
  border: 0;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover span {
  position: absolute;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: #064e3b;
  font-size: 34px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
}

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

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

.content-card {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 18px;
  color: #374151;
}

.side-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-link {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link img {
  width: 70px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-link strong {
  display: block;
  margin-bottom: 3px;
}

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

.site-footer {
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.88);
  background: #022c22;
}

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

.footer-inner strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  margin: 0;
}

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

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

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

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

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

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

  .menu-button {
    display: block;
  }

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

  .hero {
    height: 620px;
  }

  .hero-content {
    top: 46%;
  }

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

  .detail-head {
    grid-template-columns: 170px 1fr;
    gap: 22px;
  }

  .ranking-item {
    grid-template-columns: 54px 86px 1fr;
  }

  .ranking-item .btn-primary {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .container,
  .footer-inner {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .nav-shell {
    height: 64px;
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    height: 600px;
  }

  .hero-content {
    width: calc(100% - 36px);
  }

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

  .hero-controls {
    right: 18px;
    bottom: 24px;
  }

  .hero-dots {
    bottom: 38px;
    left: 18px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 16px;
  }

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

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

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

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

  .page-hero {
    padding: 54px 0 36px;
  }

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

  .detail-cover {
    width: 62%;
    max-width: 240px;
  }

  .content-card {
    padding: 22px;
  }

  .ranking-item {
    grid-template-columns: 46px 74px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .ranking-number {
    width: 42px;
    height: 42px;
    font-size: 17px;
    border-radius: 14px;
  }

  .ranking-info h2,
  .ranking-info h3 {
    font-size: 18px;
  }
}
