:root {
  --emerald: #059669;
  --teal: #0d9488;
  --deep: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
}

.brand-text {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover {
  color: var(--emerald);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 9px 12px;
  color: #0f172a;
  font-size: 22px;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  display: grid;
  gap: 12px;
}

.mobile-nav[hidden] {
  display: none;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  position: relative;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  padding: 72px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-content {
  max-width: 760px;
  color: #fff;
}

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

.hero-labels span,
.tag,
.card-badge,
.info-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  font-size: 13px;
  font-weight: 800;
}

.hero-labels span {
  color: #fff;
  background: rgba(5, 150, 105, 0.88);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.85;
}

.hero-tags .tag {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.32);
}

.btn-light {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.hero-dots {
  position: absolute;
  left: 72px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
  background: #fff;
}

.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  padding: 0 16px;
  outline: none;
  font-weight: 700;
}

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

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

.full-bleed {
  width: 100%;
  margin: 0;
  padding: 52px 0;
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.full-bleed .inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 54px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--emerald);
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

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

.movie-card,
.category-card,
.info-card,
.player-panel,
.detail-panel {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.info-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #047857);
}

.large-card .card-cover {
  aspect-ratio: 21 / 9;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.74));
}

.card-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  color: #fff;
  background: rgba(5, 150, 105, 0.92);
}

.card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.card-title {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.32;
}

.card-title a:hover {
  color: var(--emerald);
}

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

.tag-row {
  margin-top: 12px;
}

.tag {
  padding: 5px 10px;
  font-size: 12px;
}

.category-card {
  padding: 26px;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

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

.category-card span {
  margin-top: 16px;
  color: var(--emerald);
  font-weight: 900;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 82px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(5, 150, 105, 0.36);
}

.rank-item img {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.rank-item strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.3;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

.player-panel {
  position: relative;
  background: #020617;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.74));
  border: 0;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

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

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.3);
  font-size: 30px;
}

.detail-panel {
  padding: 28px;
}

.detail-panel h1 {
  margin: 10px 0 16px;
  color: #0f172a;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-intro {
  color: var(--muted);
  line-height: 1.85;
  font-size: 16px;
}

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

.content-block {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.content-block h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.content-block p {
  color: #334155;
  line-height: 2;
  font-size: 16px;
}

.content-block + .content-block {
  margin-top: 18px;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.pagination-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 34px 0 0;
}

.pagination-like a {
  border-radius: 999px;
  padding: 11px 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: #0f172a;
  font-weight: 900;
}

.no-result {
  display: none;
  padding: 40px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  color: var(--muted);
  background: #fff;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-carousel {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 38px 24px 70px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .section-head {
    display: block;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: auto 70px 1fr;
  }
}
