:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f0fdf4;
  --brand: #059669;
  --brand-dark: #065f46;
  --brand-light: #34d399;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.navbar {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
}

.nav-links a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  font-size: 22px;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08)),
    radial-gradient(circle at 15% 30%, rgba(16, 185, 129, 0.45), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 610px;
  margin: 0 auto;
  padding: 80px 22px 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.35);
}

.hero-content h1 {
  max-width: 760px;
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: #fff;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.home-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.home-search-form button {
  min-height: 48px;
  padding: 0 26px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.28);
}

.primary-btn:hover,
.home-search-form button:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.30);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.active {
  width: 32px;
  background: #fff;
}

.quick-search {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  padding: 0 22px;
}

.quick-search-inner,
.page-shell {
  max-width: 1240px;
  margin: 0 auto;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  gap: 26px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-heading h2,
.page-title-block h1,
.article-section h2,
.player-section h2,
.category-more h2 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

.quick-search h2 {
  font-size: 28px;
}

.quick-search p,
.section-heading p,
.page-title-block p,
.category-card p,
.article-section p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search p {
  margin: 8px 0 0;
}

.home-search-form {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fafb;
}

.home-search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 12px;
  font-size: 15px;
}

.category-strip {
  padding: 34px 22px 0;
}

.category-strip-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-strip a,
.category-card,
.rank-item,
.ranking-row,
.movie-card-link,
.filter-panel,
.article-section,
.player-section,
.detail-hero,
.category-more {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.category-strip a {
  padding: 18px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover,
.category-card:hover,
.movie-card-link:hover,
.rank-item:hover,
.ranking-row:hover {
  transform: translateY(-4px);
  border-color: rgba(5, 150, 105, 0.45);
}

.category-strip span {
  color: var(--brand);
  font-size: 13px;
}

.page-shell {
  padding: 44px 22px 70px;
}

.page-top {
  padding-top: 34px;
}

.content-section,
.rank-preview,
.ranking-list,
.category-grid {
  margin-top: 34px;
}

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

.section-heading h2 {
  font-size: 32px;
}

.section-heading p {
  margin: 8px 0 0;
}

.section-link {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 17px;
  color: var(--brand);
  background: var(--soft);
}

.section-link:hover {
  color: #fff;
  background: var(--brand);
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card[hidden],
.ranking-row[hidden] {
  display: none;
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-link:hover {
  box-shadow: var(--shadow);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
}

.movie-card-body strong {
  font-size: 17px;
  line-height: 1.35;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item span,
.rank-number {
  color: var(--brand);
  font-size: 20px;
  font-weight: 900;
}

.rank-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-title-block {
  padding: 34px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 15%, rgba(52, 211, 153, 0.55), transparent 28%),
    linear-gradient(135deg, #052e2b, #064e3b 56%, #022c22);
  box-shadow: var(--shadow);
}

.page-title-block span {
  color: #a7f3d0;
  font-weight: 800;
}

.page-title-block h1 {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
}

.page-title-block p {
  max-width: 850px;
  margin: 12px 0 0;
  color: #d1fae5;
  font-size: 17px;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  width: fit-content;
  padding: 7px 12px;
  color: var(--brand);
  background: var(--soft);
  border-radius: 999px;
}

.category-card p {
  margin: 0;
}

.filter-panel {
  margin-top: 26px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  border-radius: 20px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #f9fafb;
  color: #111827;
  padding: 0 13px;
  font-size: 15px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.filter-count {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--brand-dark);
  background: var(--soft);
  font-weight: 900;
  white-space: nowrap;
}

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

.ranking-row {
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}

.ranking-row img {
  width: 92px;
  height: 124px;
  object-fit: cover;
  border-radius: 12px;
  background: #ecfdf5;
}

.ranking-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ranking-info strong {
  font-size: 20px;
}

.ranking-info em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 800;
}

.ranking-info span {
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
  border-radius: 24px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #ecfdf5;
  box-shadow: var(--shadow);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 850px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.detail-info .detail-meta span {
  color: var(--brand-dark);
  background: var(--soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 750;
}

.tag-list a:hover {
  color: #fff;
  background: var(--brand);
}

.player-section,
.article-section,
.category-more {
  margin-top: 30px;
  padding: 26px;
  border-radius: 22px;
}

.player-section h2,
.article-section h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

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

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.35);
  font-size: 32px;
  transform: translateX(3px);
}

.video-box.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-section p {
  margin: 0 0 24px;
  font-size: 17px;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.category-more div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-more a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--soft);
  font-weight: 800;
}

.category-more a:hover {
  color: #fff;
  background: var(--brand);
}

.footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 34px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.footer-about p {
  max-width: 560px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer a:hover {
  color: var(--brand-light);
}

.footer-bottom {
  padding: 18px 22px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

@media (max-width: 860px) {
  .navbar {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 22px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
  }

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

  .nav-links a {
    padding: 12px 10px;
    border-radius: 10px;
  }

  .nav-links a:hover {
    background: #f3f4f6;
  }

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

  .hero-content {
    padding-top: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-inner,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-grid,
  .category-strip-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  .brand-text small {
    display: none;
  }

  .navbar,
  .page-shell,
  .quick-search,
  .category-strip {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-search-form {
    flex-direction: column;
  }

  .home-search-form input {
    min-height: 44px;
  }

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

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

  .movie-card-body strong {
    font-size: 15px;
  }

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

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

  .ranking-row a {
    grid-template-columns: 48px 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .ranking-row img {
    width: 74px;
    height: 100px;
  }

  .ranking-info strong {
    font-size: 16px;
  }

  .ranking-info span {
    display: none;
  }

  .page-title-block,
  .detail-hero,
  .player-section,
  .article-section,
  .category-more {
    padding: 20px;
    border-radius: 20px;
  }

  .player-start span {
    width: 62px;
    height: 62px;
    font-size: 25px;
  }
}
