/* =============================================
   SmartCity Tashkent — Custom Onboarding Tour
   Pure CSS — no libraries — works on file://
   ============================================= */

/* ─── KEYFRAMES ──────────────────────────── */
@keyframes sc-fade-in  { from{opacity:0} to{opacity:1} }
@keyframes sc-fade-out { from{opacity:1} to{opacity:0} }

@keyframes sc-pop-in {
  from { opacity:0; transform:scale(0.82) translateY(28px); }
  to   { opacity:1; transform:scale(1)    translateY(0);    }
}

@keyframes sc-float {
  0%,100% { transform:translateY(0);   }
  50%     { transform:translateY(-8px); }
}

@keyframes sc-ring-pulse {
  0%,100% { box-shadow:0 0 0 4px rgba(59,130,246,.14), 0 0 24px rgba(59,130,246,.22); }
  50%     { box-shadow:0 0 0 9px rgba(59,130,246,.07), 0 0 44px rgba(59,130,246,.34); }
}

@keyframes sc-spin {
  from { transform:rotate(0deg);   }
  to   { transform:rotate(360deg); }
}

/* ─── WELCOME OVERLAY ───────────────────── */
#sc-welcome {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,8,16,.94);
  backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity .4s ease;
}
#sc-welcome.sc-in  { opacity:1; }
#sc-welcome.sc-out { opacity:0!important; pointer-events:none; }

.sc-wcard {
  position: relative;
  background: rgba(14,20,38,.98);
  border: 1px solid rgba(59,130,246,.28);
  border-radius: 24px;
  padding: 44px 40px 36px;
  max-width: 460px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(59,130,246,.06),
    0 32px 80px rgba(0,0,0,.72),
    0 0 100px rgba(59,130,246,.08);
  animation: sc-pop-in .55s cubic-bezier(.34,1.56,.64,1) .05s both;
  overflow: hidden;
}

.sc-wcard::before {
  content:'';
  position:absolute;
  top:-80px; left:50%;
  transform:translateX(-50%);
  width:260px; height:260px;
  background:radial-gradient(circle,rgba(59,130,246,.15) 0%,transparent 70%);
  pointer-events:none;
}

.sc-wcard > * { position:relative; z-index:1; }

.sc-w-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  animation: sc-float 3.2s ease-in-out infinite;
}

.sc-w-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.28);
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}

.sc-wcard h2 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg,#fff 0%,#3b82f6 55%,#8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.2;
}

.sc-wcard > p {
  font-size: .88rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 26px;
  font-family: 'Inter', sans-serif;
}

.sc-wcard > p strong { color:#f1f5f9; font-weight:600; }

.sc-w-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 30px;
}

.sc-pill {
  padding: 5px 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 100px;
  font-size: .78rem;
  color: #94a3b8;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.sc-w-btns { display:flex; gap:10px; justify-content:center; }

.sc-btn-primary {
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(59,130,246,.42);
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.sc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(59,130,246,.58);
}

.sc-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  color: #64748b;
  font-family: 'Inter', sans-serif;
  font-size: .84rem;
  font-weight: 500;
  padding: 13px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
}
.sc-btn-ghost:hover { border-color:rgba(255,255,255,.2); color:#94a3b8; }

.sc-w-count {
  margin-top: 18px;
  font-size: .72rem;
  color: #334155;
  font-family: 'Inter', sans-serif;
}

/* ─── OVERLAY STRIPS ────────────────────── */
.sc-ov {
  position: fixed;
  z-index: 99990;
  background: rgba(5,8,16,.82);
  pointer-events: all;
  opacity: 0;
  cursor: default;
  transition:
    opacity .35s ease,
    top    .38s cubic-bezier(.4,0,.2,1),
    left   .38s cubic-bezier(.4,0,.2,1),
    right  .38s cubic-bezier(.4,0,.2,1),
    bottom .38s cubic-bezier(.4,0,.2,1),
    width  .38s cubic-bezier(.4,0,.2,1),
    height .38s cubic-bezier(.4,0,.2,1);
}

.sc-ov.sc-ov-show { opacity:1; }
.sc-ov.sc-notrans  { transition:opacity .3s ease!important; }

/* ─── HIGHLIGHT RING ────────────────────── */
#sc-hl-ring {
  position: fixed;
  z-index: 99992;
  border: 2px solid rgba(59,130,246,.85);
  border-radius: 12px;
  box-shadow:
    0 0 0 4px rgba(59,130,246,.12),
    0 0 24px rgba(59,130,246,.25);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity .35s ease,
    top    .38s cubic-bezier(.4,0,.2,1),
    left   .38s cubic-bezier(.4,0,.2,1),
    width  .38s cubic-bezier(.4,0,.2,1),
    height .38s cubic-bezier(.4,0,.2,1);
  animation: sc-ring-pulse 2.8s ease-in-out infinite;
}
#sc-hl-ring.sc-hl-show { opacity:1; }
#sc-hl-ring.sc-notrans  { transition:opacity .3s ease!important; }

/* ─── POPOVER ───────────────────────────── */
#sc-popover {
  position: fixed;
  z-index: 99999;
  width: 320px;
  background: rgba(14,20,38,.97);
  border: 1px solid rgba(59,130,246,.22);
  border-radius: 18px;
  padding: 20px 22px 18px;
  box-shadow:
    0 0 0 1px rgba(59,130,246,.06),
    0 24px 64px rgba(0,0,0,.72),
    0 0 40px rgba(59,130,246,.06);
  backdrop-filter: blur(24px);
  font-family: 'Inter', sans-serif;
  opacity: 0;
  transform: translateY(10px) scale(.97);
  pointer-events: none;
  transition:
    opacity .3s ease,
    transform .3s ease,
    top  .38s cubic-bezier(.4,0,.2,1),
    left .38s cubic-bezier(.4,0,.2,1);
}
#sc-popover.sc-pop-show {
  opacity:1;
  transform:none;
  pointer-events:all;
}

.sc-pop-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

#sc-pop-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 22px;
  padding: 0 9px;
  background: linear-gradient(135deg,#3b82f6,#8b5cf6);
  border-radius: 100px;
  font-size: .64rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  flex-shrink: 0;
}

#sc-pop-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

#sc-pop-title {
  font-size: .95rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

#sc-pop-text {
  font-size: .84rem;
  color: #94a3b8;
  line-height: 1.65;
  margin: 0 0 14px;
}

.sc-progress-wrap {
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 100px;
  margin-bottom: 16px;
  overflow: hidden;
}

#sc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#3b82f6,#8b5cf6);
  border-radius: 100px;
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.sc-pop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#sc-btn-skip {
  background: none;
  border: none;
  color: #475569;
  font-family: 'Inter', sans-serif;
  font-size: .77rem;
  cursor: pointer;
  padding: 6px 2px;
  white-space: nowrap;
  transition: color .2s;
}
#sc-btn-skip:hover { color:#64748b; }

.sc-nav-btns { display:flex; gap:6px; }

#sc-btn-prev,
#sc-btn-next {
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

#sc-btn-prev {
  background: rgba(255,255,255,.05);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,.1);
}
#sc-btn-prev:hover:not(:disabled) {
  background: rgba(255,255,255,.1);
  color: #f1f5f9;
}
#sc-btn-prev:disabled { opacity:.3; cursor:not-allowed; }

#sc-btn-next {
  background: linear-gradient(135deg,#3b82f6,#6366f1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,.35);
}
#sc-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,.52);
}

/* ─── KEYBOARD HINT ─────────────────────── */
.sc-key-hint {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,.05);
  padding-top: 10px;
  font-size: .7rem;
  color: #334155;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.sc-key-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  font-family: inherit;
  font-size: .65rem;
  color: #64748b;
}

/* ─── TOAST ──────────────────────────────── */
#sc-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  z-index: 999999;
  background: rgba(16,185,129,.11);
  border: 1px solid rgba(16,185,129,.3);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  font-family: 'Inter', sans-serif;
  opacity: 0;
  transition: all .5s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  pointer-events: none;
}
#sc-toast.sc-toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.sc-toast-icon { font-size:1.4rem; flex-shrink:0; }

#sc-toast strong {
  display: block;
  font-size: .88rem;
  color: #f1f5f9;
  margin-bottom: 2px;
}

#sc-toast small {
  font-size: .74rem;
  color: #64748b;
}

/* ─── RESTART BUTTON ────────────────────── */
#sc-restart-btn {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 9995;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 100px;
  color: #3b82f6;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  padding: 9px 16px 9px 12px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
  white-space: nowrap;
}

#sc-restart-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

#sc-restart-btn.sc-restart-show {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

#sc-restart-btn:hover {
  background: rgba(59,130,246,.2);
  border-color: rgba(59,130,246,.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,.25);
}

/* ─── RESPONSIVE ────────────────────────── */
@media (max-width: 480px) {
  #sc-popover { width: calc(100vw - 32px); }
  .sc-wcard { padding: 36px 24px 28px; }
  .sc-wcard h2 { font-size: 1.3rem; }
  .sc-w-btns { flex-direction: column; }
  .sc-btn-primary,
  .sc-btn-ghost { width: 100%; }
}
