
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #059669;
  --primary-dark: #047857;
  --blue: #2563eb;
  --dark: #07111f;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.logo {
  font-size: 22px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-dark);
  background: rgba(5, 150, 105, 0.11);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-link {
  display: block;
  padding: 12px 16px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: #08111f;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide::before,
.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
}

.hero-slide::before {
  z-index: 1;
  background: linear-gradient(90deg, rgba(7, 17, 31, 0.96) 0%, rgba(7, 17, 31, 0.72) 45%, rgba(7, 17, 31, 0.28) 100%);
}

.hero-slide::after {
  z-index: 2;
  background: radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.35), transparent 32%), linear-gradient(0deg, rgba(7, 17, 31, 0.88), transparent 45%);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 12vh;
  width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bbf7d0;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #065f46;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  background: #d1fae5;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-light {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 10vh;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 24px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 34px;
  opacity: 1;
  background: #10b981;
}

.search-shell {
  position: relative;
  z-index: 5;
  width: min(820px, calc(100% - 32px));
  margin: -34px auto 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-box input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  color: var(--ink);
  background: #f8fafc;
}

.search-box input:focus,
.filter-bar input:focus {
  border-color: rgba(5, 150, 105, 0.6);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result img {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.search-result strong {
  display: block;
  color: var(--ink);
}

.search-result span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.page-section {
  padding: 74px 0;
}

.page-section.tight {
  padding-top: 42px;
}

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

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

.section-title p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(5, 150, 105, 0.36);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.13);
}

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

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

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

.play-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.28);
}

.play-badge {
  right: 12px;
  bottom: 12px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}

.rank-no {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #1d4ed8);
  box-shadow: var(--shadow);
}

.category-card::after {
  position: absolute;
  inset: auto -35px -45px auto;
  width: 130px;
  height: 130px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #064e3b;
  font-weight: 900;
  background: #ffffff;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--blue));
}

.rank-item img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.filter-pill {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  font-weight: 800;
  background: #ffffff;
}

.filter-pill.is-active {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.detail-hero {
  padding: 44px 0 30px;
  color: #ffffff;
  background: radial-gradient(circle at 25% 20%, rgba(16, 185, 129, 0.32), transparent 28%), linear-gradient(135deg, #07111f, #0f172a 58%, #064e3b);
}

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

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 34px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

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

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.35);
}

.detail-title h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-title p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-info {
  padding: 54px 0 72px;
}

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

.article-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.article-card {
  padding: 30px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.article-card p {
  margin: 0 0 18px;
  color: #334155;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.info-table div {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-table span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.info-table strong {
  display: block;
  margin-top: 3px;
}

.side-card {
  padding: 20px;
}

.side-card .rank-item {
  grid-template-columns: 34px 50px 1fr;
  padding: 9px;
  border-radius: 14px;
}

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

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.pagination-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 900;
  color: var(--primary-dark);
  background: #d1fae5;
}

.site-footer {
  padding: 44px 0;
  color: #cbd5e1;
  background: #07111f;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 620px;
  margin: 10px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  color: #e2e8f0;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 36px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #ffffff;
}

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

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

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero,
  .hero-slider {
    min-height: 78vh;
  }

  .hero-content {
    bottom: 16vh;
  }

  .hero-controls {
    right: 16px;
    bottom: 28px;
  }

  .search-box,
  .filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .section-head,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .article-card {
    padding: 22px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }
}

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

  .hero h1,
  .hero h2,
  .detail-title h1 {
    letter-spacing: -0.04em;
  }
}
