:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #059669;
  --brand-2: #0d9488;
  --brand-dark: #047857;
  --gold: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  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: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

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

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

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

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 24px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  color: #374151;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  padding: 10px;
}

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

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

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image,
.page-hero-bg,
.movie-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-content h1,
.page-hero h1 {
  width: min(760px, 100%);
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.08em;
  font-weight: 900;
}

.hero-content p,
.page-hero p {
  width: min(650px, 100%);
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 15px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.22);
  backdrop-filter: blur(12px);
  font-weight: 700;
  font-size: 14px;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.search-panel button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-panel button,
.text-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.search-panel button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

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

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

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.content-section {
  padding: 70px 0;
}

.search-wrap {
  padding: 34px 0 0;
}

.soft-bg {
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 55%, #eef2ff 100%);
}

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

.section-heading h2,
.side-panel h2,
.detail-panel h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.section-heading p,
.side-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.search-panel input {
  min-height: 48px;
  border: 0;
  outline: 0;
  padding: 0 16px;
  border-radius: 16px;
  color: #0f172a;
  background: #f8fafc;
}

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

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

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

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

.featured-grid,
.rank-grid,
.category-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.06);
  filter: saturate(1.1);
}

.play-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.9);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin-bottom: 9px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta {
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

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

.wide-card {
  min-height: 420px;
}

.wide-card .card-cover {
  aspect-ratio: 16 / 10;
}

.wide-card .card-title {
  font-size: 24px;
}

.compact-card .card-body {
  padding: 13px;
}

.compact-card .card-title {
  min-height: 42px;
  font-size: 15px;
}

.compact-card .card-desc {
  display: none;
}

.rank-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.rank-card .card-cover {
  aspect-ratio: 3 / 4;
}

.rank-card .card-title {
  min-height: auto;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--gold), #ef4444);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.25);
}

.category-tile,
.overview-hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-tile img,
.overview-hero img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img,
.overview-hero:hover img {
  transform: scale(1.05);
  opacity: 0.88;
}

.category-tile span,
.category-tile small,
.overview-hero span {
  position: absolute;
  left: 22px;
  right: 22px;
  color: #ffffff;
}

.category-tile span,
.overview-hero span {
  bottom: 72px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.category-tile small {
  bottom: 24px;
  color: #dbeafe;
  line-height: 1.5;
}

.page-hero,
.movie-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.page-hero {
  min-height: 380px;
  display: flex;
  align-items: center;
}

.small-hero,
.rank-hero {
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.35), transparent 36%), linear-gradient(135deg, #020617 0%, #064e3b 100%);
}

.page-hero-shade,
.movie-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.52));
}

.page-hero-content,
.movie-hero-inner {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #a7f3d0;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.overview-body h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.overview-body p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.8;
}

.overview-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

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

.movie-hero {
  min-height: 330px;
}

.detail-wrap {
  margin-top: -110px;
  padding-top: 0;
}

.detail-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.38);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.player-box.is-playing .player-overlay {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.24);
}

.player-overlay strong {
  width: min(620px, calc(100% - 40px));
  text-align: center;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.2;
}

.player-overlay small {
  color: #d1fae5;
  font-weight: 700;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  border-radius: 999px;
  padding: 7px 12px;
  color: #d1fae5;
  background: rgba(2, 6, 23, 0.7);
  font-size: 13px;
  font-weight: 700;
}

.player-box.is-playing .player-status {
  display: none;
}

.detail-panel,
.side-panel {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.07em;
  font-weight: 900;
}

.one-line {
  margin: 8px 0 26px;
  color: #065f46;
  font-size: 20px;
  line-height: 1.8;
  font-weight: 800;
}

.detail-panel p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.detail-tags {
  margin-top: 12px;
}

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

.side-rank-list .rank-card {
  grid-template-columns: 92px minmax(0, 1fr);
  box-shadow: none;
}

.side-rank-list .card-desc,
.side-rank-list .tag-row {
  display: none;
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

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

.site-footer p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #475569;
}

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

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 20px;
  border-radius: 18px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
  font-weight: 700;
}

.empty-state.show {
  display: block;
}

[data-movie-card].hidden-by-search {
  display: none;
}

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

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

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

  .detail-side {
    display: none;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 650px;
  }

  .hero-content {
    padding: 92px 0 96px;
  }

  .hero-content h1,
  .page-hero h1 {
    letter-spacing: -0.06em;
  }

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

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

  .grid-6,
  .grid-5,
  .grid-4,
  .featured-grid,
  .rank-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-grid,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

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

  .content-section {
    padding: 48px 0;
  }

  .grid-6,
  .grid-5,
  .grid-4,
  .featured-grid,
  .rank-grid,
  .category-grid,
  .overview-preview,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .movie-card:not(.rank-card) .card-cover {
    aspect-ratio: 16 / 10;
  }

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

  .category-tile,
  .overview-hero {
    min-height: 190px;
  }

  .category-tile img,
  .overview-hero img {
    min-height: 190px;
  }

  .detail-panel,
  .side-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .player-box {
    border-radius: 20px;
  }
}
