:root {
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-100: #d1fae5;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-800);
  background: var(--stone-50);
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #0f766e, #064e3b);
}

img.is-empty {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-700));
  box-shadow: 0 14px 30px rgba(6, 95, 70, 0.28);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--white);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
  transform: scale(1);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  padding: 20px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  height: 3px;
  border-radius: 999px;
  background: var(--white);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.header-search input {
  width: 230px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-search input::placeholder {
  color: rgba(209, 250, 229, 0.9);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.66);
}

.header-search button {
  border: 0;
  color: var(--emerald-800);
  background: var(--white);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--white);
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  color: var(--white);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 28%, rgba(5, 150, 105, 0.42), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.9));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  gap: 40px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 54px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 13px;
  color: var(--emerald-100);
  border: 1px solid rgba(209, 250, 229, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

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

.hero p {
  width: min(100%, 760px);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.hero-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-800);
  background: var(--emerald-100);
}

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

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

.button-primary {
  color: var(--emerald-900);
  background: var(--white);
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.24);
}

.button-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.button-soft {
  color: var(--emerald-800);
  background: var(--emerald-100);
}

.button-primary:hover,
.button-ghost:hover,
.button-soft:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-xl);
  isolation: isolate;
}

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

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

.hero-poster-info {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-1px);
}

.hero-prev {
  left: max(18px, calc((100% - var(--container)) / 2 - 58px));
}

.hero-next {
  right: max(18px, calc((100% - var(--container)) / 2 - 58px));
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 56px 0;
}

.section-muted {
  background: linear-gradient(135deg, var(--stone-100), var(--gray-100));
}

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

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-800);
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.section-title::before {
  content: "";
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: var(--emerald-600);
}

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

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 330px);
  gap: 22px;
  overflow-x: auto;
  padding: 2px 2px 20px;
  scroll-snap-type: x proximity;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.card-wide .poster-link img {
  aspect-ratio: 16 / 10;
}

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

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: var(--white);
  background: var(--emerald-600);
}

.poster-play {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  padding: 10px 16px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
  color: var(--emerald-700);
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.category-card {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-700), var(--teal-600));
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.page-hero {
  padding: 54px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.4), transparent 30%),
    linear-gradient(135deg, var(--slate-900), var(--emerald-900));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 11px 14px;
  color: var(--gray-700);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}

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

.rank-list {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.rank-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: var(--emerald-100);
  transform: translateX(4px);
}

.rank-row img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  overflow: hidden;
  font-weight: 820;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
}

.detail-hero {
  padding: 46px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 74% 24%, rgba(20, 184, 166, 0.34), transparent 26%),
    linear-gradient(135deg, var(--slate-950), var(--emerald-900));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--white);
}

.detail-top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.1);
}

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
}

.detail-info p {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--emerald-100);
  border: 1px solid rgba(209, 250, 229, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--slate-950);
  box-shadow: var(--shadow-xl);
}

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

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

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

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 999px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.play-badge::before {
  content: "▶";
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--emerald-800);
  background: var(--white);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(90deg, var(--slate-900), #111827);
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: background 0.2s ease;
}

.player-controls button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.player-status {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

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

.article-panel,
.side-panel {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.25;
}

.article-panel p {
  margin: 0 0 16px;
  color: var(--gray-700);
}

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.site-footer p {
  margin: 12px 0 0;
  color: #cbd5e1;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #94a3b8;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  color: var(--gray-600);
}

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

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content,
  .detail-top,
  .rank-layout,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .detail-cover {
    width: min(100%, 260px);
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .brand {
    font-size: 19px;
  }

  .hero,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    padding-top: 28px;
    gap: 24px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 42px 0;
  }

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

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

  .rank-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }
}
