/* FW4 — Indigo Movie Platform */
:root {
  --brand: #4f46e5;
  --brand2: #4338ca;
  --brand3: #6366f1;
  --brand-light: #eef2ff;
  --brand-glow: rgba(79,70,229,.12);
  --ink: #1e1b4b;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --border: #e5e7eb;
  --bg: #fafbff;
  --white: #fff;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

/* ─── Navbar ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,251,255,.82);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; height: 64px; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; letter-spacing: -.02em;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand3));
  color: #fff; display: grid; place-items: center; font-size: 16px;
  font-weight: 800; box-shadow: 0 4px 16px var(--brand-glow);
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px; border-radius: 10px; font-size: 14px;
  font-weight: 500; color: var(--gray); transition: .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--brand); background: var(--brand-light);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-search {
  display: flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; background: var(--white); transition: .2s;
}
.nav-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.nav-search input {
  width: 200px; padding: 9px 16px; border: 0; font-size: 14px; outline: none;
  background: transparent; color: var(--ink);
}
.nav-search input::placeholder { color: var(--gray-light); }
.nav-search button {
  padding: 9px 18px; border: 0; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s;
}
.nav-search button:hover { background: var(--brand2); }
.nav-burger {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--white); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-mobile { display: none; padding: 8px 32px 20px; flex-direction: column; gap: 4px; }
.nav-mobile a {
  padding: 10px 14px; border-radius: 10px; font-size: 15px; color: var(--gray);
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--brand); background: var(--brand-light); }
.nav-mobile.open { display: flex; }

/* ─── Container ── */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ─── Hero ── */
.hero {
  margin: 48px auto 64px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; min-height: 420px;
}
.hero-text .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
  background: var(--brand-light); color: var(--brand);
  font-size: 13px; font-weight: 600;
}
.hero-text h1 {
  font-size: clamp(34px, 5vw, 56px); font-weight: 800; line-height: 1.1;
  letter-spacing: -.03em; margin-bottom: 18px;
}
.hero-text h1 span {
  background: linear-gradient(135deg, var(--brand), var(--brand3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  font-size: 17px; color: var(--gray); line-height: 1.7; margin-bottom: 28px; max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  padding: 13px 28px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 24px var(--brand-glow);
  transition: .2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px var(--brand-glow); }
.btn-secondary {
  padding: 13px 28px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white);
  color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: .2s;
}
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-light); }
.hero-visual {
  position: relative;
}
.hero-visual img {
  width: 100%; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}
.hero-visual::before {
  content: ""; position: absolute; inset: -12px; border-radius: 44px;
  background: linear-gradient(135deg, var(--brand), var(--brand3));
  opacity: .06; z-index: -1;
}

/* ─── Section ── */
.sec { margin-bottom: 72px; }
.sec-head {
  text-align: center; margin-bottom: 40px;
}
.sec-head h2 {
  font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px;
}
.sec-head p { font-size: 16px; color: var(--gray); max-width: 500px; margin: 0 auto; }

/* ─── Movie Grid ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; }

.card {
  border-radius: var(--radius); overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: .3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.card-thumb {
  position: relative; aspect-ratio: 3/4.2; overflow: hidden;
  background: #f3f4f6;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.5) 0%, transparent 40%);
  opacity: 0; transition: .3s;
}
.card:hover .card-thumb::after { opacity: 1; }
.card-thumb .play-icon {
  position: absolute; z-index: 2; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--brand);
  display: grid; place-items: center; font-size: 18px;
  opacity: 0; transition: .3s;
}
.card:hover .card-thumb .play-icon { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-thumb .year-tag {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px);
  color: #fff; font-size: 11px; font-weight: 600;
}
.card-body { padding: 14px 16px 16px; }
.card-body .meta {
  display: flex; gap: 6px; font-size: 11px; color: var(--gray-light);
  font-weight: 500; margin-bottom: 4px;
}
.card-body h3 {
  font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-body .stars {
  display: flex; align-items: center; gap: 4px; font-size: 12px; color: #f59e0b; font-weight: 700;
}

/* ─── Category Pills ── */
.cats {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.cat-pill {
  padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white);
  font-size: 14px; font-weight: 600; color: var(--gray); transition: .2s;
  box-shadow: var(--shadow-sm);
}
.cat-pill:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ─── Rank List ── */
.rank-list { display: grid; gap: 8px; }
.rank-item {
  display: grid; grid-template-columns: 48px 64px 1fr auto;
  gap: 14px; align-items: center; padding: 12px 18px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--white); box-shadow: var(--shadow-sm); transition: .2s;
}
.rank-item:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.rank-no {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; font-size: 18px; font-weight: 800;
  background: var(--brand-light); color: var(--brand);
}
.rank-item:nth-child(1) .rank-no { background: var(--brand); color: #fff; }
.rank-item:nth-child(2) .rank-no { background: var(--brand); color: #fff; opacity: .85; }
.rank-item:nth-child(3) .rank-no { background: var(--brand); color: #fff; opacity: .7; }
.rank-pic { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.rank-pic img { width: 100%; height: 100%; object-fit: cover; }
.rank-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.rank-info span { font-size: 12px; color: var(--gray-light); }
.rank-score { font-size: 16px; font-weight: 800; color: #f59e0b; }

/* ─── Stats Bar ── */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px;
}
.stat-card {
  text-align: center; padding: 28px 16px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-card .num {
  font-size: 36px; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--brand), var(--brand3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .label { font-size: 13px; color: var(--gray-light); margin-top: 4px; }

/* ─── CTA Section ── */
.cta {
  text-align: center; padding: 64px 32px; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; box-shadow: var(--shadow-xl);
}
.cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta p { font-size: 16px; opacity: .85; margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.btn-white {
  padding: 13px 32px; border-radius: 999px; border: 0;
  background: #fff; color: var(--brand); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: .2s; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }

/* ─── Detail Page ── */
.bread {
  padding: 24px 0 12px; font-size: 13px; color: var(--gray-light);
}
.bread a { color: var(--brand); }
.detail-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.detail-poster { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xl); }
.detail-poster img { width: 100%; }
.detail-info h1 { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.detail-info .d-meta {
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px;
  font-size: 14px; color: var(--gray);
}
.detail-info .d-meta .val { color: var(--brand); font-weight: 700; }
.detail-info .d-desc { font-size: 16px; line-height: 1.8; color: var(--gray); margin-bottom: 20px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.detail-tags span {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--brand-light); color: var(--brand);
}
.player { margin-top: 28px; }
.player-box {
  aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden;
  background: #000; box-shadow: var(--shadow-xl);
}
.player-box video { width: 100%; height: 100%; object-fit: contain; outline: none; }

/* ─── Footer ── */
.foot {
  margin-top: 80px; padding: 48px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font-size: 13px; font-weight: 700; color: var(--gray); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .03em; }
.foot-grid a { display: block; font-size: 13px; color: var(--gray-light); line-height: 2.3; }
.foot-grid a:hover { color: var(--brand); }
.foot-copy { text-align: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--gray-light); }

/* ─── Responsive ── */
@media (max-width: 1024px) {
  .nav-links, .nav-search { display: none; }
  .nav-burger { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { max-width: 400px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hero-text h1 { font-size: 28px; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
  .sec-head h2 { font-size: 24px; }
  .foot-grid { grid-template-columns: 1fr; }
  .detail-grid { gap: 20px; }
}
