/* ══════════════════════════════════════════════════════════════
   NEURAVID™ CHALLENGE UNIVERSE™
   "Obsidian Cosmos" self-contained module. Does NOT alter any
   existing NEURAVID feature. All HTML/CSS injected by the script.
   ══════════════════════════════════════════════════════════════ */

/* ── Floating trigger (bottom-left, distinct from NVStage FAB) ── */
.nvc-fab {
  position: fixed; left: 22px; bottom: 22px; z-index: 945;
  display: flex; align-items: center; gap: .55rem;
  padding: .7rem 1.1rem .7rem .85rem; border-radius: 999px; cursor: pointer; border: none;
  font-family: 'Exo 2', sans-serif; font-weight: 700; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #2563eb 55%, #0ff0fc);
  box-shadow: 0 6px 26px rgba(124,58,237,.5);
  animation: nvc-fab-pulse 2.6s infinite; transition: transform .2s;
}
.nvc-fab:hover { transform: scale(1.06); }
.nvc-fab .nvc-fab-ic { font-size: 1.25rem; filter: drop-shadow(0 0 6px rgba(15,240,252,.6)); }
.nvc-fab .nvc-fab-badge {
  background: #f5c518; color: #1a1400; font-size: .68rem; font-weight: 800;
  padding: .1rem .4rem; border-radius: 999px;
}
@keyframes nvc-fab-pulse {
  0% { box-shadow: 0 0 0 0 rgba(124,58,237,.55); }
  70% { box-shadow: 0 0 0 16px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}

/* ── Panel ── */
.nvc-panel {
  position: fixed; inset: 0; z-index: 955;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(124,58,237,.22), transparent 55%),
    radial-gradient(1000px 700px at 100% 0%, rgba(15,240,252,.16), transparent 50%),
    linear-gradient(160deg, #05060f 0%, #0b0a1f 50%, #05060f 100%);
  color: #ecebff; overflow-y: auto; display: none;
}
.nvc-panel.open { display: block; }
.nvc-panel::-webkit-scrollbar { width: 10px; }
.nvc-panel::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
.nvc-panel::-webkit-scrollbar-thumb { background: linear-gradient(#a855f7,#0ff0fc); border-radius: 5px; }
.nvc-panel { scrollbar-color: #a855f7 #05060f; scrollbar-width: thin; }

.nvc-header {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem; background: rgba(5,6,15,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124,58,237,.35);
}
.nvc-brand { display: flex; align-items: center; gap: .8rem; }
.nvc-brand .nvc-logo {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: linear-gradient(135deg, #a855f7, #0ff0fc); box-shadow: 0 0 18px rgba(124,58,237,.6);
}
.nvc-brand h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: .5px; }
.nvc-brand .nvc-sub { font-size: .72rem; color: #a5a3d6; }
.nvc-wallet { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.nvc-chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); font-size: .76rem; font-weight: 600;
}
.nvc-chip b { color: #f5c518; }
.nvc-close {
  width: 40px; height: 40px; border-radius: 10px; font-size: 1.1rem; cursor: pointer;
  background: rgba(255,255,255,.06); color: #ecebff; border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.nvc-close:hover { background: #ef4444; border-color: #ef4444; }

/* ── Tabs ── */
.nvc-tabs {
  display: flex; gap: .4rem; padding: .8rem 1.6rem 0; overflow-x: auto; position: sticky; top: 73px; z-index: 5;
  background: linear-gradient(180deg, rgba(5,6,15,.95), rgba(5,6,15,.6));
}
.nvc-tabs::-webkit-scrollbar { height: 0; }
.nvc-tab {
  flex: 0 0 auto; padding: .6rem .9rem; border-radius: 12px 12px 0 0; cursor: pointer; white-space: nowrap;
  font-size: .82rem; font-weight: 600; color: #a5a3d6; border: 1px solid transparent; border-bottom: none;
  background: rgba(255,255,255,.03); transition: .18s;
}
.nvc-tab:hover { color: #ecebff; }
.nvc-tab.active {
  color: #fff; background: rgba(124,58,237,.18); border-color: rgba(124,58,237,.5);
  box-shadow: 0 -2px 14px rgba(124,58,237,.3) inset;
}

.nvc-body { padding: 1.4rem 1.6rem 3rem; max-width: 1240px; margin: 0 auto; }
.nvc-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; color: #a5a3d6; margin: 1.2rem 0 .7rem; }
.nvc-muted { color: #a5a3d6; font-size: .82rem; }
.nvc-divider { height: 1px; background: rgba(255,255,255,.08); margin: 1rem 0; }
.nvc-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.nvc-mt { margin-top: 1rem; }

/* ── Buttons ── */
.nvc-btn {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.1rem; border-radius: 10px;
  font-weight: 600; font-size: .82rem; cursor: pointer; border: 1px solid transparent; transition: .18s; font-family: inherit;
}
.nvc-btn-violet { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; }
.nvc-btn-violet:hover { box-shadow: 0 0 18px rgba(168,85,247,.5); }
.nvc-btn-cyan { background: linear-gradient(135deg, #0ff0fc, #2563eb); color: #04121f; }
.nvc-btn-cyan:hover { box-shadow: 0 0 18px rgba(15,240,252,.45); }
.nvc-btn-gold { background: linear-gradient(135deg, #f5c518, #b8860b); color: #1a1400; }
.nvc-btn-gold:hover { box-shadow: 0 0 18px rgba(245,197,24,.5); }
.nvc-btn-outline { background: transparent; border-color: rgba(255,255,255,.2); color: #ecebff; }
.nvc-btn-outline:hover { border-color: #0ff0fc; color: #0ff0fc; }
.nvc-btn-block { width: 100%; justify-content: center; }

/* ── Challenge catalog grid ── */
.nvc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
@media (max-width:1100px){ .nvc-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width:820px){ .nvc-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:520px){ .nvc-grid { grid-template-columns: 1fr; } }
.nvc-card {
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); border-left: 3px solid var(--accent, #a855f7);
  border-radius: 14px; padding: 1rem; transition: .2s; display: flex; flex-direction: column; gap: .5rem;
}
.nvc-card:hover { transform: translateY(-4px); border-color: var(--accent, #a855f7); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.nvc-card .nvc-card-top { display: flex; align-items: center; gap: .6rem; }
.nvc-card .nvc-card-ic {
  width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: color-mix(in srgb, var(--accent, #a855f7) 22%, transparent); color: var(--accent, #a855f7);
}
.nvc-card .nvc-card-name { font-weight: 800; font-size: .95rem; background: linear-gradient(135deg, #fff, var(--accent,#a855f7)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nvc-card .nvc-card-cat { font-size: .68rem; color: #a5a3d6; }
.nvc-card .nvc-card-desc { font-size: .76rem; color: #c9c7ef; line-height: 1.35; min-height: 2.2em; }
.nvc-card .nvc-card-stats { display: flex; flex-wrap: wrap; gap: .35rem .7rem; font-size: .7rem; color: #a5a3d6; }
.nvc-card .nvc-card-stats b { color: #ecebff; }
.nvc-stars { color: #f5c518; letter-spacing: 1px; font-size: .8rem; }
.nvc-card .nvc-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .2rem; }

/* ── Category chips ── */
.nvc-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.nvc-chip-btn {
  padding: .45rem .8rem; border-radius: 999px; cursor: pointer; font-size: .78rem; font-weight: 600;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); color: #c9c7ef; display: flex; align-items: center; gap: .4rem;
}
.nvc-chip-btn:hover { border-color: var(--accent); color: #fff; }
.nvc-chip-btn.active { background: rgba(124,58,237,.2); border-color: #a855f7; color: #fff; }

/* ── Mega challenge ── */
.nvc-mega {
  border-radius: 20px; padding: 1.6rem; border: 1px solid rgba(245,197,24,.4);
  background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(15,240,252,.1)); position: relative; overflow: hidden;
}
.nvc-mega::after { content: ""; position: absolute; right: -10px; top: -10px; font-size: 8rem; opacity: .08; }
.nvc-mega h3 { font-size: 1.6rem; font-weight: 800; }
.nvc-mega .nvc-mega-prize { font-size: 2.2rem; font-weight: 800; color: #f5c518; font-family: 'Exo 2', sans-serif; }
.nvc-countdown { display: flex; gap: .6rem; margin-top: .8rem; }
.nvc-cd-box { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: .6rem .9rem; text-align: center; min-width: 64px; }
.nvc-cd-box .nvc-cd-num { font-size: 1.5rem; font-weight: 800; font-family: 'Exo 2', sans-serif; color: #0ff0fc; }
.nvc-cd-box .nvc-cd-lbl { font-size: .62rem; color: #a5a3d6; text-transform: uppercase; }
.nvc-progress { height: 12px; border-radius: 999px; background: rgba(0,0,0,.4); overflow: hidden; margin-top: 1rem; border: 1px solid rgba(255,255,255,.12); }
.nvc-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #a855f7, #0ff0fc); box-shadow: 0 0 12px rgba(15,240,252,.6); transition: width .6s; }

/* ── AI Judge ── */
.nvc-judge-family { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 1rem; margin-bottom: .8rem; }
.nvc-judge-family .nvc-jf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.nvc-judge-family .nvc-jf-name { font-weight: 700; font-size: .95rem; }
.nvc-weight { font-size: .72rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; background: rgba(168,85,247,.2); color: #d8b4fe; border: 1px solid rgba(168,85,247,.4); }
.nvc-crit { display: inline-block; font-size: .72rem; padding: .25rem .6rem; margin: .2rem .25rem 0 0; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #c9c7ef; }
.nvc-tech { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.nvc-tech span { font-size: .74rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(15,240,252,.1); border: 1px solid rgba(15,240,252,.3); color: #a5f3fc; }

/* ── Hall of Fame ── */
.nvc-hof { display: flex; flex-direction: column; gap: .5rem; }
.nvc-hof-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); }
.nvc-rank { font-size: 1.3rem; font-weight: 800; width: 42px; text-align: center; color: #f5c518; }
.nvc-hof-row:nth-child(1) .nvc-rank { color: #f5c518; }
.nvc-hof-row .nvc-hof-name { font-weight: 700; }
.nvc-hof-row .nvc-hof-meta { font-size: .74rem; color: #a5a3d6; }
.nvc-hof-row .nvc-hof-score { margin-left: auto; text-align: right; }
.nvc-hof-row .nvc-hof-score b { color: #0ff0fc; font-size: 1.05rem; }
.nvc-hof-row .nvc-hof-earn { color: #f5c518; font-size: .8rem; }

/* ── Forms ── */
.nvc-field { margin-bottom: .9rem; }
.nvc-field label { display: block; font-size: .76rem; color: #a5a3d6; margin-bottom: .3rem; }
.nvc-input, .nvc-select, .nvc-textarea {
  width: 100%; padding: .65rem .85rem; border-radius: 10px; font-size: .85rem; font-family: inherit;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: #ecebff;
}
.nvc-textarea { min-height: 90px; resize: vertical; }
.nvc-input:focus, .nvc-select:focus, .nvc-textarea:focus { outline: none; border-color: #0ff0fc; box-shadow: 0 0 0 3px rgba(15,240,252,.15); }
.nvc-revenue-box { background: rgba(245,197,24,.08); border: 1px solid rgba(245,197,24,.3); border-radius: 14px; padding: 1rem; margin-top: 1rem; font-size: .82rem; color: #e8d9a8; }
.nvc-revenue-box li { margin: .3rem 0 .3rem 1.1rem; }

/* ── Sponsor PRO ── */
.nvc-tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
@media (max-width:900px){ .nvc-tier-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:520px){ .nvc-tier-grid { grid-template-columns: 1fr; } }
.nvc-tier { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 1rem; background: rgba(255,255,255,.03); cursor: pointer; transition: .18s; }
.nvc-tier:hover { border-color: #a855f7; }
.nvc-tier.active { border-color: #0ff0fc; background: rgba(15,240,252,.08); box-shadow: 0 0 18px rgba(15,240,252,.2); }
.nvc-tier .nvc-tier-name { font-weight: 800; font-size: 1.05rem; }
.nvc-tier .nvc-tier-price { font-size: 1.4rem; font-weight: 800; color: #f5c518; font-family: 'Exo 2', sans-serif; margin: .3rem 0; }
.nvc-tier .nvc-tier-meta { font-size: .74rem; color: #a5a3d6; line-height: 1.5; }
.nvc-event-list { display: flex; flex-direction: column; gap: .4rem; max-height: 320px; overflow-y: auto; padding-right: .3rem; }
.nvc-event { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.nvc-event input { width: 18px; height: 18px; accent-color: #0ff0fc; cursor: pointer; }
.nvc-event .nvc-ev-ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(124,58,237,.2); color: #d8b4fe; }
.nvc-event .nvc-ev-grow { flex: 1; min-width: 0; }
.nvc-event .nvc-ev-name { font-weight: 600; font-size: .85rem; }
.nvc-event .nvc-ev-meta { font-size: .7rem; color: #a5a3d6; }
.nvc-budget-box { margin-top: 1rem; padding: 1.1rem; border-radius: 14px; background: rgba(15,240,252,.07); border: 1px solid rgba(15,240,252,.3); text-align: center; }
.nvc-budget-box .nvc-budget-val { font-size: 1.9rem; font-weight: 800; font-family: 'Exo 2', sans-serif; color: #0ff0fc; }
.nvc-budget-box .nvc-budget-lbl { font-size: .76rem; color: #a5f3fc; }

/* ── My challenges ── */
.nvc-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
@media (max-width:700px){ .nvc-stat-row { grid-template-columns: repeat(2,1fr); } }
.nvc-stat { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 1rem; }
.nvc-stat .nvc-stat-val { font-size: 1.5rem; font-weight: 800; font-family: 'Exo 2', sans-serif; }
.nvc-stat .nvc-stat-lbl { font-size: .72rem; color: #a5a3d6; }
.nvc-list { display: flex; flex-direction: column; gap: .5rem; }
.nvc-item { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); }
.nvc-item .nvc-thumb { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; background: rgba(124,58,237,.2); color: #d8b4fe; flex-shrink: 0; }
.nvc-item .nvc-grow { flex: 1; min-width: 0; }
.nvc-item .nvc-name { font-weight: 600; font-size: .88rem; }
.nvc-item .nvc-meta { font-size: .74rem; color: #a5a3d6; }
.nvc-empty { text-align: center; color: #a5a3d6; padding: 2rem; font-size: .9rem; }

/* ── Toast (bottom-center) ── */
.nvc-toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.nvc-toast { background: rgba(11,10,31,.96); border: 1px solid rgba(124,58,237,.5); color: #ecebff; padding: .7rem 1.2rem; border-radius: 12px; font-size: .85rem; box-shadow: 0 8px 30px rgba(0,0,0,.5); animation: nvc-toastIn .3s ease; max-width: 90vw; }
.nvc-toast.gold { border-color: rgba(245,197,24,.6); }
@keyframes nvc-toastIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
