:root {
  --bg: #0a0a0f;
  --panel: #14151c;
  --panel-2: #1b1d27;
  --line: #23252f;
  --brand: #16d660;       /* reelgood green */
  --brand-2: #11b350;
  --txt: #f1f3f6;
  --muted: #8b909c;
  --good: #16d660;
  --mid: #f5c518;
  --bad: #ff5a5f;
}

* { box-sizing: border-box; }

body {
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--txt);
}

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

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2d38; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a3e4c; }

/* ---- hero ---- */
.hero-glow {
  background:
    radial-gradient(55% 75% at 75% 0%, rgba(22,214,96,.22), transparent 60%),
    radial-gradient(45% 60% at 8% 10%, rgba(22,214,96,.12), transparent 60%);
}

/* ---- poster card (reelgood style) ---- */
.poster {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-color: #1b1d27;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  transition: transform .18s ease, box-shadow .18s ease, outline-color .18s ease;
  outline: 2px solid transparent;
}
.card { cursor: pointer; }
.card:hover .poster {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.65);
  outline-color: var(--brand);
}

/* rating pill bottom-right */
.rating-pill {
  position: absolute; bottom: 8px; right: 8px; z-index: 3;
  font-size: 12px; font-weight: 800;
  padding: 2px 7px; border-radius: 7px;
  color: #07140c;
  background: var(--good);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.rating-pill.mid { background: var(--mid); color: #1a1500; }
.rating-pill.bad { background: var(--bad); color: #2a0203; }

.corner-tag {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
}

.card-title { font-size: 12.5px; font-weight: 600; margin-top: 6px; line-height: 1.4; }
.card-sub { font-size: 11px; color: var(--muted); }

/* ---- horizontal shelf ---- */
.shelf {
  display: flex; gap: 12px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.shelf > * { flex: 0 0 132px; scroll-snap-align: start; }
@media (min-width: 640px) { .shelf > * { flex-basis: 150px; } }

/* ---- filter chips ---- */
.chip {
  font-size: 12.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); white-space: nowrap; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { color: var(--txt); border-color: #3a3e4c; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #07140c; }

.seg {
  display: inline-flex; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 3px; gap: 2px;
}
.seg button {
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 7px;
  color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.seg button.active { background: var(--brand); color: #07140c; }

/* ---- explore reels ---- */
.reel {
  aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; position: relative;
  background-size: cover; background-position: center; background-color: #1b1d27;
  display: flex; align-items: flex-end; cursor: pointer; transition: transform .18s ease;
}
.reel:hover { transform: scale(1.02); outline: 2px solid var(--brand); }
.reel::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.82) 100%); }
.reel .meta { position: relative; z-index: 2; padding: 11px; width: 100%; }
.play-btn { position: absolute; inset: 0; z-index: 3; display: flex;
  align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.reel:hover .play-btn { opacity: 1; }

.poster .meta { position: relative; z-index: 2; padding: 9px; width: 100%; }

.fade-in { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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

.cart-pop { animation: pop .3s ease; }
@keyframes pop { 0%{transform:scale(.8)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }


/* ===== Explore reels feed (shorts/reels style) ===== */
.reels-feed {
  height: calc(100dvh - 150px);
  max-width: 460px;
  margin: 0 auto;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: 16px;
  background: #000;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.reels-feed::-webkit-scrollbar { display: none; }

.reel-slide {
  position: relative;
  height: calc(100dvh - 150px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background-size: cover;
  background-position: center;
  background-color: #111;
  overflow: hidden;
  display: flex;
}
.reel-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.9) 100%);
  pointer-events: none;
}
.reel-video { position: absolute; inset: 0; z-index: 0; }
.reel-video iframe { width: 100%; height: 100%; border: 0; }

.reel-rail {
  position: absolute; bottom: 90px; left: 12px; z-index: 3;
  display: flex; flex-direction: column; gap: 16px;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 22px; color: #fff; cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.rail-btn span { font-size: 10px; font-weight: 700; }

.reel-info {
  position: absolute; bottom: 16px; right: 14px; left: 70px; z-index: 3;
  cursor: pointer;
}

/* ===== Detail page ===== */
.detail-banner {
  position: relative; border-radius: 18px; overflow: hidden;
  background-size: cover; background-position: center; background-color: #1b1d27;
  min-height: 230px; display: flex; align-items: flex-end;
}
.detail-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,.2) 0%, rgba(10,10,15,.55) 50%, rgba(10,10,15,.96) 100%);
}
.detail-banner .inner { position: relative; z-index: 2; padding: 18px; width: 100%; display: flex; gap: 16px; align-items: flex-end; }

.cast-photo {
  width: 76px; height: 76px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: #1b1d27; margin: 0 auto;
  outline: 2px solid #23252f;
}
