/* =========================
   VibeQuests — page-specific CSS
   Load AFTER vibeq-shared.css
   ========================= */

/* Page palette (from old) */
:root{
  --vq-bg-start:#0e122c;
  --vq-bg-end:#1a1f4a;
  --vq-card:#0C1793;
  --vq-card-alt:#082B9B;
  --vq-ink:#cfe2ff;
  --vq-muted:#9abafc;
  --vq-accent:#78f0ff;
  --vq-accent2:#E6BEF0;
  --vq-chip:#1f2b70;
}

/* Override shared body background to VibeQuests style */
body{
  color: var(--vq-ink);
  min-height:100dvh;
}

/* Main wrapper (shared doesn’t define .wrap) */
.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:24px 20px 80px;
}

/* Sticky header zone under the global nav row */
header{
  position:sticky;
  top:0;
  z-index:20;
  background:linear-gradient(180deg,#0e122cf2,#0e122cE6 85%,transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #ffffff12;
}

.head-inner{
  max-width:1080px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:stretch;
  text-align:left;
}

/* ======================================
   Restore oval / pill nav background
   (VibeQuests uses .site-nav-row, not .site-header)
   ====================================== */
.site-nav-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding:10px 18px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);

  background:
    radial-gradient(circle at top left, rgba(109, 242, 255, 0.07), transparent 55%),
    rgba(4, 8, 30, 0.94);

  box-shadow: 0 20px 40px rgba(0,0,0,0.65);
  backdrop-filter: blur(22px);
}


.brand{
  display:flex;
  gap:10px;
  align-items:center;
  flex-direction:column;
}

.subtitle{
  color:var(--vq-muted);
  font-size: clamp(12px,2.2vw,16px);
}

/* Controls row */
.controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

/* Chips */
.chip{
  background:var(--vq-chip);
  color:#ffffff;
  font-weight:700;
  border:1px solid #ffffff22;
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  cursor:pointer;
  transition:.2s transform, .2s background;
}
.chip:hover{ transform:translateY(-2px); background:#2b3aa0; }
.chip[data-active="true"]{
  outline:2px solid var(--vq-accent);
  background:#2b3aa0;
}

/* Chips strip */
#chips{
  position:relative;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  display:flex;
  gap:12px;
  padding:8px 12px;
  margin:0;
}
#chips .chip{ flex:0 0 auto; }
#chips::before, #chips::after{
  content:'';
  position:absolute;
  top:0; bottom:0;
  width:28px;
  pointer-events:none;
  z-index:2;
}
#chips::before{
  left:0;
  background:linear-gradient(to right, rgba(14,18,44,1), rgba(14,18,44,0));
}
#chips::after{
  right:0;
  background:linear-gradient(to left, rgba(14,18,44,1), rgba(14,18,44,0));
}

/* Search */
.search-wrap{
  width:100%;
  display:flex;
  justify-content:center;
  margin:0 auto 8px;
}
.search{
  display:flex;
  align-items:center;
  gap:10px;
  background:#151a3d;
  border:1px solid #ffffff1e;
  border-radius:999px;
  padding:8px 12px;
  color:#dbe7ff;
}
.search input{
  background:transparent;
  border:0;
  outline:0;
  color:#dbe7ff;
  width:200px;
}

/* Grid layout */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:16px;
  margin-top:18px;
}

/* Card styling (override shared .card) */
.wrap .card{
  position:relative;
  overflow:hidden;
  border-radius:18px;
  background:linear-gradient(135deg, var(--vq-card), var(--vq-card-alt));
  border:1px solid #ffffff12;
  padding:14px 14px 18px;
  box-shadow: 0 12px 30px #00000055, inset 0 0 0 1px #ffffff0e;
  transition: transform .20s ease, box-shadow .20s ease, border-color .20s ease;
}
.wrap .card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px #00000077;
  border-color:#ffffff22;
}

/* Ribbon */
.ribbon{
  position:absolute;
  top:-2px; right:2px;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(13,19,47,0.75);
  color:var(--vq-accent);
  border:1px solid #ffffff22;
  border-radius:6px;
  padding:6px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.08em;
  line-height:1;
}
.ribbon.live{
  background: linear-gradient(135deg, rgba(0,255,153,0.9), rgba(0,204,102,0.9));
  color:#001a0d !important;
  border:none;
  font-weight:700;
}

/* Thumb */
.thumb{
  position:relative;
  height:120px;
  border-radius:12px;
  margin-bottom:12px;
  background:#1b2aa9;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#ffffffea;
  text-shadow: 0 6px 16px #00000088;
  background-size: cover;
  background-position: center;
}
.thumb-text{
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  text-align:center;
  line-height:1.6;
  z-index:2;
  width:90%;
  max-width:90%;
  word-wrap:break-word;
}
.thumb-text .t{ font-size:20px; font-weight:800; color:#30EEFF; }
.thumb-text .s{ font-size:16px; font-weight:600; color:#ffffff; }

/* Text + tags */
.title{ font-size:18px; margin:0 0 6px; color:#e9efff; }
.desc{
  font-size:13.5px;
  color:#bed2ff;
  margin:0 0 10px;
  min-height:40px;
  white-space:normal;
}
.desc .desc-label.feeling{ font-weight:700; color:#FFC857; }
.desc .desc-label.aspiration{ font-weight:700; color:#30EEFF; }

.tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.tag{
  font-size:11.5px;
  padding:6px 10px;
  border-radius:999px;
  background:#d6eaff;
  border:1px solid #0C1793;
  color:#0C1793;
  font-weight:700;
}

/* CTA buttons */
.cta{ display:flex; gap:8px; flex-wrap:wrap; }
.btn{
  background:#10163a;
  color:#e6f0ff;
  padding:8px 12px;
  border-radius:12px;
  font-size:13px;
  cursor:pointer;
  border:1px solid #ffffff24;
  transition:.2s background, .2s transform;
}
.btn:hover{ background:#1a2455; transform: translateY(-1px); }
.btn.primary{
  background: linear-gradient(135deg,#3441f5,#7a5cff);
  border-color: transparent;
}

/* Badges */
.badgebar{ display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 6px; }
.badge{
  background:rgba(13,19,47,0.75);
  border:1px solid #ffffff22;
  color:#E7F3FF;
  font-size:12px;
  font-weight:700;
  padding:6px 10px;
  border-radius:999px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

/* KPIs */
.kpis{
  display:grid;
  grid-template-columns: repeat(4, minmax(120px,1fr));
  gap:12px;
  margin-top:20px;
}
.kpis .kpi{
  background:#10163a;
  border:1px solid #ffffff1e;
  border-radius:14px;
  padding:12px;
}
.kpi .k{ font-size:12px; color:#a9b9ff; margin-bottom:2px; }
.kpi .v{ font-size:20px; font-weight:700; }
.kpi .trend{ font-size:12px; color:#9fe2b3; }

/* Admin mode off hides KPIs */
.admin-off .kpis{ display:none; }

/* Mobile */
@media (max-width: 640px){
  html, body { overflow-x: hidden; }

  .subtitle{
    display:block;
    white-space:normal;
    max-width:92%;
    font-size:13px;
    line-height:1.35;
    margin:2px auto 8px;
  }

  .controls{ justify-content:center; }

  .search{ width:100%; max-width:560px; border-radius:10px; }
  .search input{ width:100%; min-width:0; }

  .grid{ grid-template-columns:1fr !important; padding:0 8px; }
  .wrap .card{ width:100%; max-width:560px; margin:12px auto; }

  .thumb{ height:140px; }
  .thumb-text .t{ font-size:18px; }
  .thumb-text .s{ font-size:14px; opacity:.95; }

  .kpis{ grid-template-columns: 1fr 1fr; }

  /* Mobile chips wrap into grid */
  #chips{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px !important;
    overflow: visible !important;
    padding: 8px 10px !important;
  }
  #chips::before, #chips::after{ display:none !important; }
  #chips .chip{
    width: 100% !important;
    justify-content: center;
  }
}

@media (min-width: 390px) and (max-width: 640px){
  #chips{ grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
