
:root {
  --green-50: #ecfdf5;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --emerald-700: #047857;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 24px rgba(15, 23, 42, 0.10);
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 45%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-600), var(--emerald-700));
  box-shadow: 0 12px 28px rgba(4, 120, 87, 0.28);
}

.header-inner {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  font-size: 30px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--yellow-300);
}

.nav-search {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.nav-search:hover {
  background: rgba(255, 255, 255, 0.28);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero {
  position: relative;
  height: min(72vh, 620px);
  min-height: 460px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #10241b;
  transform: scale(1.04);
  transition: transform 4s ease;
}

.hero-slide.active img {
  transform: scale(1.0);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.90) 0%, rgba(6, 95, 70, 0.65) 42%, rgba(0, 0, 0, 0.16) 100%),
              linear-gradient(0deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.0) 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 80px 20px 120px;
  display: flex;
  align-items: center;
}

.hero-panel {
  width: min(680px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  color: var(--yellow-300);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-weight: 700;
  font-size: 14px;
}

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

.hero p {
  margin: 0;
  max-width: 600px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: var(--yellow-400);
  box-shadow: 0 16px 32px rgba(250, 204, 21, 0.35);
}

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

.secondary-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

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

.main-section,
.page-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #047857 55%, #0f766e);
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.stat-grid,
.category-grid,
.movie-grid,
.related-grid {
  display: grid;
  gap: 24px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 64px;
}

.stat-card,
.category-card,
.movie-card,
.info-panel,
.player-shell,
.rank-list,
.search-panel {
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.stat-card {
  padding: 26px;
  color: #ffffff;
  overflow: hidden;
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #ec4899, #e11d48); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #3b82f6, #0891b2); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #22c55e, #047857); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #f59e0b, #ea580c); }

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

.stat-card span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  font-size: 30px;
}

.section-title h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: 30px;
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  max-width: 520px;
  color: var(--gray-500);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #064e3b;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  right: 14px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow-400);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

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

.movie-card h3 {
  margin: 0 0 10px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.tag-row,
.detail-tags,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta {
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-meta span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-600);
}

.movie-meta span {
  padding: 3px 8px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  padding: 24px;
  min-height: 190px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::before {
  content: "";
  position: absolute;
  top: -46px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(250, 204, 21, 0.22));
}

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--gray-800);
}

.category-card p,
.category-card ul {
  position: relative;
  margin: 0;
  color: var(--gray-500);
  line-height: 1.75;
}

.category-card ul {
  padding-left: 18px;
  margin-top: 12px;
  font-size: 14px;
}

.rank-list {
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s ease;
}

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

.rank-row:hover {
  background: var(--green-50);
}

.rank-number {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-500), var(--emerald-700));
  font-weight: 900;
}

.rank-row img {
  width: 110px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  background: #064e3b;
}

.rank-row h3 {
  margin: 0 0 7px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
}

.rank-views {
  color: var(--green-600);
  font-weight: 800;
  white-space: nowrap;
}

.search-panel {
  padding: 24px;
  margin-bottom: 30px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-800);
  background: #ffffff;
  outline: none;
}

.search-input:focus,
.select-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-btn {
  min-height: 40px;
  color: var(--gray-700);
  background: var(--gray-100);
}

.filter-btn.active {
  color: #ffffff;
  background: var(--green-600);
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--gray-500);
}

.detail-hero {
  background: radial-gradient(circle at 20% 10%, rgba(250, 204, 21, 0.26), transparent 30%),
              linear-gradient(135deg, #064e3b, #047857 50%, #111827);
  color: #ffffff;
}

.detail-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 52px;
}

.breadcrumb {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

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

.detail-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  background: #052e24;
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.detail-info p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.detail-tags span {
  background: rgba(250, 204, 21, 0.18);
  color: var(--yellow-300);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  padding: 18px;
  margin-bottom: 28px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.38), rgba(4, 120, 87, 0.55));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.play-core {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow-400);
  box-shadow: 0 18px 46px rgba(250, 204, 21, 0.42);
  font-size: 34px;
}

.play-core strong {
  font-size: 20px;
}

.player-status {
  margin: 12px 0 0;
  color: var(--gray-500);
  font-size: 14px;
}

.info-panel {
  padding: 26px;
  margin-bottom: 24px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
  color: var(--gray-800);
}

.info-panel p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.9;
}

.side-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.side-card img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background: #064e3b;
}

.side-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.5;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.pagination-links a {
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-weight: 700;
}

.pagination-links a:hover {
  color: var(--green-600);
  background: var(--green-50);
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #064e3b);
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px;
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 34px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--yellow-400);
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 9px;
  color: #9ca3af;
  line-height: 1.7;
  font-size: 14px;
}

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

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 14px;
}

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

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

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

  .detail-cover {
    max-width: 320px;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 620px;
  }

  .hero-content {
    padding-top: 54px;
    align-items: center;
  }

  .main-section,
  .page-section {
    padding: 42px 16px;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
  }

  .rank-row {
    grid-template-columns: 46px 84px 1fr;
  }

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

  .rank-row img {
    width: 84px;
    height: 56px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    padding-top: 22px;
  }

  .detail-cover {
    max-width: 230px;
  }
}
