
:root {
  color-scheme: light;
  --green: #16a34a;
  --emerald: #047857;
  --teal: #0f766e;
  --yellow: #facc15;
  --orange: #f97316;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f0fdf4;
  --line: rgba(15, 118, 110, 0.14);
  --shadow: 0 20px 60px rgba(15, 118, 110, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 48%, #fefce8 100%);
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #16a34a 0%, #047857 55%, #0f766e 100%);
  box-shadow: 0 12px 36px rgba(4, 120, 87, 0.24);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  height: 68px;
  padding: 0 22px;
  margin: 0 auto;
}

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

.brand-icon {
  font-size: 32px;
  line-height: 1;
}

.brand-name {
  font-size: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.nav-search,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-search:hover,
.mobile-link:hover {
  color: #1f2937;
  background: var(--yellow);
  transform: translateY(-1px);
}

.nav-search {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 16%, rgba(250, 204, 21, 0.28), transparent 28%), linear-gradient(120deg, #166534 0%, #059669 48%, #0f766e 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 1), transparent);
  pointer-events: none;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
  background-image: linear-gradient(90deg, rgba(6, 78, 59, 0.9) 0%, rgba(5, 150, 105, 0.74) 48%, rgba(15, 118, 110, 0.58) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 48px;
  align-items: center;
  max-width: 1240px;
  min-height: 640px;
  padding: 70px 22px 120px;
  margin: 0 auto;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fef9c3;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.btn-primary,
.search-submit {
  color: #1f2937;
  background: var(--yellow);
  box-shadow: 0 16px 32px rgba(250, 204, 21, 0.28);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(14px);
}

.btn-ghost {
  color: var(--emerald);
  background: #ecfdf5;
}

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

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: absolute;
  inset: 18px;
  border-radius: 26px;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.05) 58%), var(--hero-poster);
  background-size: cover;
  background-position: center;
}

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.hero-poster-info h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
}

.hero-poster-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

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

.section,
.page-section {
  max-width: 1240px;
  padding: 52px 22px;
  margin: 0 auto;
}

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

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

.section-heading p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.stat-card,
.category-card,
.content-card {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 150px;
  padding: 24px;
  color: #ffffff;
}

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

.stat-card span {
  color: rgba(255, 255, 255, 0.82);
}

.from-green {
  background: linear-gradient(135deg, #22c55e, #047857);
}

.from-blue {
  background: linear-gradient(135deg, #3b82f6, #0891b2);
}

.from-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.from-pink {
  background: linear-gradient(135deg, #ec4899, #be123c);
}

.from-gray {
  background: linear-gradient(135deg, #374151, #111827);
}

.from-orange {
  background: linear-gradient(135deg, #f97316, #b45309);
}

.from-amber {
  background: linear-gradient(135deg, #f59e0b, #ca8a04);
}

.from-teal {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.from-red {
  background: linear-gradient(135deg, #ef4444, #be123c);
}

.from-cyan {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
}

.from-lime {
  background: linear-gradient(135deg, #84cc16, #16a34a);
}

.from-indigo {
  background: linear-gradient(135deg, #6366f1, #4338ca);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 94, 89, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: 0 24px 64px rgba(17, 94, 89, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #064e3b, #a3e635);
}

.poster-bg {
  position: absolute;
  inset: 0;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 64%);
}

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-pill {
  left: 14px;
  bottom: 14px;
  padding: 7px 12px;
  background: rgba(22, 163, 74, 0.92);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #1f2937;
  background: var(--yellow);
}

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

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

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

.movie-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

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

.category-card {
  min-height: 260px;
  padding: 26px;
  color: #ffffff;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 72px rgba(15, 23, 42, 0.22);
}

.category-main-link {
  display: block;
}

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
}

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

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

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

.category-sample a {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.15);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 14% 20%, rgba(250, 204, 21, 0.24), transparent 25%), linear-gradient(110deg, #166534 0%, #059669 58%, #0f766e 100%);
}

.page-title {
  max-width: 1240px;
  padding: 70px 22px;
  margin: 0 auto;
}

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

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

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

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  padding: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-box input,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  color: var(--text);
  background: #ffffff;
}

.search-box input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(22, 163, 74, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.35fr) minmax(170px, 0.35fr);
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(15, 118, 110, 0.1);
}

.search-status {
  margin: 0 0 18px;
  color: var(--muted);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 86px 190px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(17, 94, 89, 0.08);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  color: #1f2937;
  background: var(--yellow);
  font-size: 22px;
  font-weight: 900;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: linear-gradient(135deg, #047857, #bef264);
}

.ranking-cover span {
  position: absolute;
  inset: 0;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
}

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

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

.ranking-meta {
  color: var(--emerald);
  font-weight: 900;
}

.detail-hero {
  color: #ffffff;
  background: linear-gradient(105deg, rgba(6, 78, 59, 0.96), rgba(5, 150, 105, 0.82)), var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-inner {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  max-width: 1240px;
  padding: 70px 22px;
  margin: 0 auto;
}

.detail-cover {
  min-height: 510px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent), var(--cover-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
}

.detail-lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.85;
}

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

.detail-meta span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

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

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 2;
}

.player-card {
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.28);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.22)), var(--cover-image);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border: 0;
  border-radius: 999px;
  color: #1f2937;
  background: var(--yellow);
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 22px 48px rgba(250, 204, 21, 0.35);
}

.player-cover h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 38px);
}

.player-cover p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.player-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-link:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.12);
}

.side-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(135deg, #065f46, #facc15);
}

.side-cover span {
  display: block;
  width: 100%;
  height: 100%;
  background-image: var(--cover-image);
  background-size: cover;
  background-position: center;
}

.side-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link small {
  color: var(--muted);
}

.site-footer {
  margin-top: 46px;
  color: #ffffff;
  background: linear-gradient(90deg, #064e3b, #0f766e);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  max-width: 1240px;
  padding: 42px 22px;
  margin: 0 auto;
}

.footer-inner p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.footer-copy {
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #1f2937;
  background: var(--yellow);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.back-top.show {
  display: inline-grid;
  place-items: center;
}

.empty-state {
  padding: 54px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

@media (max-width: 1080px) {
  .hero-content,
  .detail-inner,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 520px;
  }

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

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

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

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

  .menu-button {
    display: block;
  }

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

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding-top: 54px;
    padding-bottom: 100px;
  }

  .hero-panel {
    min-height: 360px;
  }

  .hero-actions,
  .detail-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .search-panel,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .search-box {
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

  .detail-cover {
    min-height: 430px;
  }

  .ranking-item {
    align-items: start;
  }

  .ranking-cover {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
