/* ═══════════════════════════════════════════════════
   SceneShift — main.css  (shared styles)
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Tajawal:wght@300;400;500;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --olive:    #1A2517;
  --olive-2:  #1f2d1b;
  --olive-3:  #263321;
  --sage:     #ACC8A2;
  --sage-10:  rgba(172,200,162,.10);
  --sage-20:  rgba(172,200,162,.20);
  --sage-40:  rgba(172,200,162,.40);
  --t1:  #edf2ea;
  --t2:  rgba(237,242,234,.52);
  --t3:  rgba(237,242,234,.24);
  --border: rgba(172,200,162,.09);
  --glass:  rgba(26,37,23,.78);
  --d-vibe:  #e8c97e;
  --d-pace:  #6ab4f5;
  --d-intel: #b28ef5;
  --d-emo:   #f57c7c;
  --d-ten:   #f5a05a;
  --d-unp:   #5af5c8;
  --d-prod:  #f5d55a;
  --fn-d: 'Syne', sans-serif;
  --fn-b: 'Tajawal', sans-serif;
  --fn-m: 'DM Mono', monospace;
  --r: 10px; --rl: 16px;
  --hdr-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--fn-b); background: var(--olive); color: var(--t1); min-height: 100vh; overflow-x: hidden; }

/* ─── Ambient ──────────────────────────────────── */
#amb {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(44,68,36,.9) 0%, transparent 68%), var(--olive);
  transition: background 2.4s cubic-bezier(.4,0,.2,1);
}
#amb::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.028'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ─── Splash ───────────────────────────────────── */
#sp {
  position: fixed; inset: 0; z-index: 9999; background: var(--olive);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#sw { display: flex; direction: ltr; }
.sc {
  font-family: var(--fn-d); font-size: clamp(48px,10vw,108px);
  font-weight: 800; letter-spacing: -.03em; color: var(--t1);
  opacity: 0; transform: translateY(40px); display: inline-block;
}
.sc.g { color: var(--sage); }
#sl { width: 0; height: 1.5px; background: var(--sage); margin-top: 10px; border-radius: 99px; transition: width .55s cubic-bezier(.16,1,.3,1); }
#ss { font-family: var(--fn-m); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--t3); margin-top: 14px; opacity: 0; transition: opacity .4s; }
#sp.out { animation: spOut .6s forwards; }
@keyframes spOut { to { opacity: 0; pointer-events: none; } }

/* ─── Header ───────────────────────────────────── */
#hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--hdr-h); padding: 0 clamp(14px,4vw,52px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
#hdr.stuck {
  background: rgba(26,37,23,.90);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: var(--border);
}

/* account/avatar — left */
.hdr-left { display: flex; align-items: center; gap: 10px; }
.h-acc {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sage-10); border: 1px solid var(--sage-20);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; flex-shrink: 0;
  transition: background .2s, border-color .2s;
  position: relative;
}
.h-acc:hover { background: var(--sage-20); border-color: var(--sage-40); }
.h-acc svg { width: 17px; height: 17px; color: var(--t2); }
.h-acc img { width: 100%; height: 100%; object-fit: cover; }

/* login hint tooltip */
.h-hint {
  position: absolute; top: calc(100% + 10px); left: 0;
  background: rgba(20,30,17,.96); backdrop-filter: blur(12px);
  border: 1px solid var(--sage-20); border-radius: var(--r);
  padding: 8px 12px; white-space: nowrap;
  font-family: var(--fn-b); font-size: 12px; color: var(--t2);
  pointer-events: none; opacity: 0; transform: translateY(-4px);
  transition: opacity .2s, transform .2s; z-index: 300;
}
.h-hint::before {
  content: ''; position: absolute; top: -5px; left: 12px;
  width: 8px; height: 8px; background: rgba(20,30,17,.96);
  border-left: 1px solid var(--sage-20); border-top: 1px solid var(--sage-20);
  transform: rotate(45deg);
}
.h-acc:hover .h-hint { opacity: 1; transform: translateY(0); }

/* logo */
.h-logo {
  font-family: var(--fn-d); font-size: 18px; font-weight: 800;
  letter-spacing: -.03em; color: var(--t1); text-decoration: none;
  direction: ltr; white-space: nowrap;
}
.h-logo em { color: var(--sage); font-style: normal; }

/* nav right */
.hdr-right { display: flex; align-items: center; gap: 4px; }
.h-nav-link {
  font-family: var(--fn-d); font-size: 13px; font-weight: 500;
  color: var(--t2); text-decoration: none; padding: 6px 12px;
  border-radius: 99px; transition: color .2s, background .2s;
}
.h-nav-link:hover, .h-nav-link.active { color: var(--t1); background: var(--sage-10); }
.h-taste {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px;
  background: var(--sage-10); border: 1px solid var(--sage-20);
  font-family: var(--fn-d); font-size: 12px; font-weight: 600;
  color: var(--sage); cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.h-taste:hover { background: var(--sage-20); border-color: var(--sage-40); }
.tdot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 7px var(--sage); animation: blink 2.5s ease infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ─── Main ─────────────────────────────────────── */
main { position: relative; z-index: 1; padding-top: var(--hdr-h); }

/* ─── Hero ─────────────────────────────────────── */
.hero {
  position: relative; height: calc(100svh - var(--hdr-h)); min-height: 480px;
  display: flex; align-items: flex-end;
  padding: 0 clamp(16px,5vw,72px) clamp(40px,6vw,80px); overflow: hidden;
}
.hbg {
  position: absolute; inset: 0; background-size: cover; background-position: center 15%;
  opacity: 0; transition: opacity 1.6s ease; filter: saturate(1.2);
  will-change: transform;
}
.hbg.on { opacity: 1; }
.hvig {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--olive) 0%, rgba(26,37,23,.82) 28%, rgba(26,37,23,.2) 58%, transparent 100%),
    linear-gradient(to right, rgba(26,37,23,.55) 0%, transparent 55%);
}
.hbody { position: relative; z-index: 2; max-width: 560px; }
.hchip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sage-10); border: 1px solid var(--sage-20);
  border-radius: 99px; padding: 4px 12px;
  font-family: var(--fn-m); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage); margin-bottom: 14px;
}
.cdot { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 6px var(--sage); animation: blink 2.4s ease infinite; }
.htitle {
  font-family: var(--fn-d); font-size: clamp(32px,5.5vw,72px); font-weight: 800;
  line-height: .95; letter-spacing: -.03em; color: var(--t1); margin-bottom: 12px;
  text-shadow: 0 2px 30px rgba(0,0,0,.6); direction: ltr; text-align: right;
}
.hdesc {
  font-size: 14px; font-weight: 300; line-height: 1.78; color: rgba(237,242,234,.6);
  margin-bottom: 18px; max-width: 440px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hgenres { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 22px; }
.gtag { padding: 4px 10px; border-radius: 6px; background: rgba(172,200,162,.08); border: 1px solid rgba(172,200,162,.14); font-family: var(--fn-m); font-size: 10px; color: var(--t2); }
.hmeta { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hrat { display: flex; align-items: center; gap: 5px; font-family: var(--fn-d); font-size: 14px; font-weight: 600; color: var(--d-vibe); }
.hrat svg { width: 13px; height: 13px; fill: var(--d-vibe); }
.hdots { position: absolute; bottom: clamp(16px,3vw,30px); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.hdot { width: 22px; height: 3px; border-radius: 99px; background: rgba(172,200,162,.2); cursor: pointer; transition: background .3s, width .3s; }
.hdot.on { background: var(--sage); width: 34px; }

/* buttons */
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--r); border: none; cursor: pointer;
  font-family: var(--fn-d); font-size: 13px; font-weight: 700;
  background: var(--sage); color: var(--olive);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-p:hover { background: #c2d9b9; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(172,200,162,.28); }
.btn-g {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r);
  background: rgba(237,242,234,.07); border: 1px solid rgba(237,242,234,.12);
  font-family: var(--fn-d); font-size: 13px; color: var(--t1);
  cursor: pointer; transition: background .2s;
  backdrop-filter: blur(8px);
}
.btn-g:hover { background: rgba(237,242,234,.12); }
.hacts { display: flex; gap: 10px; align-items: center; }

/* ─── Sections ─────────────────────────────────── */
.sec { padding: clamp(28px,4vw,50px) clamp(16px,5vw,72px); }
.sechd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.sectl { font-family: var(--fn-d); font-size: 17px; font-weight: 700; color: var(--t1); }
.secm { font-family: var(--fn-m); font-size: 11px; color: var(--sage); opacity: .7; text-decoration: none; letter-spacing: .05em; text-transform: uppercase; transition: opacity .2s; }
.secm:hover { opacity: 1; }
.row { display: flex; gap: 13px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.row::-webkit-scrollbar { display: none; }
.div { height: 1px; background: var(--border); margin: 0 clamp(16px,5vw,72px); }

/* ─── Card ─────────────────────────────────────── */
.card, .rcard {
  flex: 0 0 clamp(130px,13vw,168px); scroll-snap-align: start;
  cursor: pointer; position: relative; border-radius: var(--rl);
  overflow: visible; transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.card:hover, .rcard:hover { transform: scale(1.05) translateY(-5px); }
.card:hover .cin { box-shadow: 0 20px 48px rgba(0,0,0,.55), 0 0 0 1px var(--sage-20); }
.card:hover .cov, .rcard:hover .cov { opacity: 1; }
.card:hover .cposter, .rcard:hover .cposter { filter: brightness(.5) saturate(1.3); }
.card:hover .crad { opacity: 1; transform: scale(1) translateX(-50%) translateY(0); pointer-events: auto; }
.rcard { flex: 0 0 clamp(148px,15vw,188px); }
.rcard::before {
  content: ''; position: absolute; inset: -1px; border-radius: calc(var(--rl) + 1px);
  background: linear-gradient(135deg, rgba(172,200,162,.3), transparent 60%);
  opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 0;
}
.rcard:hover::before { opacity: 1; }
.cin { border-radius: var(--rl); overflow: hidden; position: relative; transition: box-shadow .35s; }
.cposter { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--olive-3); transition: filter .35s; }
.csk { flex: 0 0 clamp(130px,13vw,168px); }
.cov {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,37,23,.98) 0%, rgba(26,37,23,.5) 45%, transparent 70%);
  opacity: 0; transition: opacity .3s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px;
}
.ctype { position: absolute; top: 7px; right: 7px; padding: 3px 7px; border-radius: 5px; font-family: var(--fn-m); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; background: rgba(26,37,23,.85); backdrop-filter: blur(6px); color: var(--t2); border: 1px solid var(--border); }
.cpills { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 7px; }
.cpill { display: flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 99px; font-family: var(--fn-m); font-size: 8.5px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.1); }
.pdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cotl { font-family: var(--fn-d); font-size: 12px; font-weight: 700; color: var(--t1); line-height: 1.25; margin-bottom: 8px; }
.cacts { display: flex; align-items: center; gap: 6px; }
.csim { flex: 1; padding: 5px 8px; border-radius: 6px; background: var(--sage-10); border: 1px solid var(--sage-20); font-family: var(--fn-m); font-size: 9px; color: var(--sage); cursor: pointer; text-align: center; letter-spacing: .04em; transition: background .2s; }
.csim:hover { background: var(--sage-20); }
.cbm { width: 26px; height: 26px; border-radius: 6px; background: var(--sage-10); border: 1px solid var(--sage-20); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.cbm:hover, .cbm.saved { background: var(--sage-20); }
.cbm.saved svg { fill: var(--sage); }
.cbm svg { width: 12px; height: 12px; color: var(--sage); }
.cfoot { padding: 7px 2px 0; }
.cname { font-family: var(--fn-b); font-size: 12px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.card:hover .cname, .rcard:hover .cname { color: var(--t1); }
.cbars { display: flex; gap: 3px; margin-top: 5px; }
.cbarw { flex: 1; }
.cbarl { font-family: var(--fn-m); font-size: 7.5px; color: var(--t3); margin-bottom: 2px; }
.cbark { height: 3px; border-radius: 99px; background: rgba(172,200,162,.1); overflow: hidden; }
.cbarf { height: 100%; border-radius: 99px; transition: width .6s ease; }
.rbadge { position: absolute; top: 7px; right: 7px; padding: 3px 8px; border-radius: 5px; font-family: var(--fn-m); font-size: 9px; background: rgba(172,200,162,.18); border: 1px solid var(--sage-40); color: var(--sage); }

/* radar popup */
.crad {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: scale(.9) translateX(-50%) translateY(8px); transform-origin: bottom center;
  opacity: 0; pointer-events: none; z-index: 50; width: 186px;
  transition: opacity .28s, transform .28s cubic-bezier(.16,1,.3,1);
  background: rgba(18,28,15,.96); backdrop-filter: blur(18px);
  border: 1px solid var(--sage-20); border-radius: var(--rl); padding: 12px;
}
.rtitle { font-family: var(--fn-m); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--t3); text-align: center; margin-bottom: 8px; }

/* ─── Skeleton ─────────────────────────────────── */
.sk {
  background: linear-gradient(90deg, rgba(172,200,162,.04) 25%, rgba(172,200,162,.09) 50%, rgba(172,200,162,.04) 75%);
  background-size: 200% 100%; animation: shim 1.6s infinite; border-radius: var(--rl);
}
@keyframes shim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── Mood chips ────────────────────────────────── */
.moods { display: flex; gap: 9px; flex-wrap: wrap; }
.mood { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r); background: var(--sage-10); border: 1px solid var(--border); cursor: pointer; transition: background .2s, border-color .2s, transform .2s; white-space: nowrap; }
.mood:hover { background: var(--sage-20); border-color: var(--sage-20); transform: translateY(-2px); }
.mood.on { background: var(--sage-20); border-color: var(--sage-40); }
.mico { font-size: 16px; }
.mlbl { font-family: var(--fn-d); font-size: 13px; font-weight: 600; color: var(--t1); }
.msub { font-family: var(--fn-m); font-size: 9px; color: var(--t3); margin-top: 1px; }

/* ─── Error ─────────────────────────────────────── */
.err { display: flex; flex-direction: column; align-items: center; padding: 44px 20px; gap: 8px; color: var(--t3); text-align: center; width: 100%; min-width: 260px; }
.err p { font-family: var(--fn-m); font-size: 12px; }

/* ─── Toast ─────────────────────────────────────── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px); z-index: 9998; padding: 10px 20px; border-radius: 99px; font-family: var(--fn-d); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap; backdrop-filter: blur(12px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok { background: rgba(172,200,162,.25); border: 1px solid var(--sage-40); color: var(--sage); }
.toast-err { background: rgba(245,124,124,.2); border: 1px solid rgba(245,124,124,.4); color: #f57c7c; }

/* ─── Footer ─────────────────────────────────────── */
footer { padding: 30px clamp(16px,5vw,72px); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 8px; }
.flogo { font-family: var(--fn-d); font-size: 16px; font-weight: 800; letter-spacing: -.03em; color: var(--t1); text-decoration: none; direction: ltr; }
.flogo em { color: var(--sage); font-style: normal; }
footer p { font-family: var(--fn-m); font-size: 10px; color: var(--t3); }

/* ─── Scroll wave ───────────────────────────────── */
.wave-section { position: relative; overflow: hidden; }
.wave-section::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, var(--olive) 0%, transparent 100%);
  pointer-events: none; z-index: 2;
}

/* ─── Mobile ────────────────────────────────────── */
@media (max-width: 640px) {
  .hdr-right .h-nav-link { display: none; }
  .hdr-right .h-nav-link.active { display: inline-flex; }
  .h-taste span { display: none; }
  .h-taste { padding: 7px 10px; }
  .htitle { font-size: clamp(28px,8vw,48px); }
  .hdesc { font-size: 13px; }
  .card, .csk { flex: 0 0 clamp(120px,38vw,148px); }
  .rcard { flex: 0 0 clamp(138px,42vw,166px); }
}
@media (max-width: 380px) {
  .card, .csk { flex: 0 0 120px; }
}

/* ─── Animations (used globally) ───────────────── */
@keyframes fIn  { to { opacity: 1; } }
@keyframes fUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }