:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #10211a;
  --muted: #5f6f67;
  --soft: #e8f6ef;
  --brand: #059669;
  --brand-dark: #064e3b;
  --brand-deep: #022c22;
  --gold: #f59e0b;
  --line: #dcebe4;
  --shadow: 0 24px 60px rgba(4, 120, 87, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.96), rgba(5, 150, 105, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(2, 44, 34, 0.2);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #064e3b;
  background: linear-gradient(135deg, #bbf7d0, #ffffff);
  box-shadow: 0 8px 26px rgba(187, 247, 208, 0.3);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  white-space: nowrap;
}

.main-nav a {
  padding: 9px 12px;
  border-radius: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  padding: 10px;
}

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

.hero {
  position: relative;
  min-height: 620px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #022c22);
}

.hero-slide {
  display: none;
  min-height: 620px;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  display: block;
  animation: fadeIn 0.55s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 24%, rgba(34, 197, 94, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(2, 44, 34, 0.95) 0%, rgba(6, 78, 59, 0.80) 48%, rgba(0, 0, 0, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}

.hero-copy {
  animation: slideUp 0.75s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: #86efac;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d1fae5;
  font-size: 18px;
}

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

.hero-tags {
  margin: 22px 0 0;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ecfdf5;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row span {
  background: #ecfdf5;
  color: #047857;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn,
.play-button,
.filter-link,
.section-more,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.play-button,
.search-box button {
  color: #064e3b;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(255, 255, 255, 0.2);
}

.btn.secondary,
.filter-link,
.section-more {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn:hover,
.play-button:hover,
.filter-link:hover,
.section-more:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  min-height: 500px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.poster-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(2, 44, 34, 0.94));
}

.poster-overlay strong {
  display: block;
  font-size: 22px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 64px 0 18px;
}

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

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

.section-title span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.section-more,
.filter-link {
  color: #047857;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #86efac;
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d1fae5, #ecfeff);
}

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

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

.year-badge,
.region-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(6, 78, 59, 0.86);
  backdrop-filter: blur(10px);
}

.year-badge {
  right: 12px;
}

.region-badge {
  left: 12px;
}

.rank-badge {
  top: auto;
  left: 12px;
  bottom: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 18px;
}

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

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

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 26px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #047857, #064e3b 52%, #022c22);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #d1fae5;
}

.category-card span {
  margin-top: 18px;
  color: #bbf7d0;
  font-weight: 800;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.search-box {
  flex: 1;
  display: flex;
  gap: 10px;
}

.search-box input,
.filter-tools select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #ffffff;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 15px;
}

.search-box button {
  color: #ffffff;
  background: var(--brand);
  box-shadow: none;
}

.filter-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-tools select {
  min-width: 132px;
}

.page-hero {
  margin-top: 32px;
  padding: 48px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(134, 239, 172, 0.24), transparent 30%),
    linear-gradient(135deg, #064e3b, #022c22);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 860px;
  margin: 18px 0 0;
  color: #d1fae5;
  font-size: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.rank-number {
  color: var(--brand);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #ecfdf5;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
  padding: 42px 0 20px;
}

.player-panel,
.detail-card,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #000000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(90deg, #064e3b, #047857);
  color: #ffffff;
}

.play-button {
  color: #064e3b;
}

.player-controls span {
  color: #d1fae5;
  font-weight: 700;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #047857;
  font-weight: 700;
  margin-bottom: 20px;
}

.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

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

.detail-meta span {
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.detail-card h2 {
  margin: 30px 0 12px;
  color: #064e3b;
  font-size: 24px;
}

.detail-card p {
  color: #2f463b;
  font-size: 17px;
}

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

.side-panel-body {
  padding: 20px;
}

.side-panel h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.side-panel p {
  margin: 0;
  color: var(--muted);
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #f8fafc;
}

.related-item img {
  width: 68px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.3;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 72px;
  color: #d1fae5;
  background: linear-gradient(180deg, #064e3b, #022c22);
}

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

.footer-brand {
  margin-bottom: 10px;
  font-size: 22px;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
}

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

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

.hidden-card {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(6, 78, 59, 0.98);
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-poster {
    min-height: auto;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner,
  main,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

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

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

  .hero-content {
    padding: 42px 0 74px;
  }

  .hero-poster {
    display: none;
  }

  .section-title,
  .filter-panel,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box,
  .filter-tools {
    flex-direction: column;
    align-items: stretch;
  }

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

  .card-body {
    padding: 14px;
  }

  .card-line {
    min-height: 40px;
  }

  .page-hero {
    padding: 30px 22px;
  }

  .rank-item {
    grid-template-columns: 52px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    font-size: 22px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
