/* =============================================
   SmartCity Tashkent — Premium Onboarding UI
   Modern Glassmorphism & Fluid Animations
   ============================================= */

:root {
  --sc-tour-primary: #3b82f6;
  --sc-tour-accent: #8b5cf6;
  --sc-tour-bg: rgba(14, 20, 38, 0.96);
  --sc-tour-border: rgba(255, 255, 255, 0.12);
  --sc-tour-text: #f1f5f9;
  --sc-tour-muted: #94a3b8;
  --sc-tour-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* ─── ANIMATIONS ─────────────────────────── */
@keyframes sc-pop-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sc-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3)); }
  50%      { filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5)); }
}

@keyframes sc-toast-in {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ─── SVG OVERLAY ───────────────────────── */
#sc-tour-svg {
  filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.1));
}

#sc-tour-svg path {
  cursor: default;
  /* Glow pulse effect on the hole is tricky with SVG paths, 
     we use a drop-shadow on the whole SVG instead for subtle aura */
}

/* ─── POPOVER ───────────────────────────── */
#sc-popover {
  position: fixed;
  z-index: 99999;
  background: var(--sc-tour-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--sc-tour-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--sc-tour-shadow);
  color: var(--sc-tour-text);
  font-family: 'Inter', sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

#sc-popover.sc-pop-show {
  opacity: 1;
  pointer-events: all;
  animation: sc-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

#sc-pop-badge {
  background: linear-gradient(135deg, var(--sc-tour-primary), var(--sc-tour-accent));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#sc-pop-icon { font-size: 1.4rem; }

#sc-pop-title {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#sc-pop-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--sc-tour-muted);
  margin-bottom: 20px;
}

/* ─── PROGRESS BAR ───────────────────────── */
.sc-progress-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}

#sc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sc-tour-primary), var(--sc-tour-accent));
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── FOOTER & BUTTONS ───────────────────── */
.sc-pop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sc-btn-skip {
  background: none;
  border: none;
  color: var(--sc-tour-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px 0;
}
#sc-btn-skip:hover { color: #fff; text-decoration: underline; }

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

#sc-btn-prev, #sc-btn-next {
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

#sc-btn-prev {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sc-tour-border);
  color: var(--sc-tour-text);
}
#sc-btn-prev:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
#sc-btn-prev:disabled { opacity: 0.3; cursor: not-allowed; }

#sc-btn-next {
  background: linear-gradient(135deg, var(--sc-tour-primary), var(--sc-tour-accent));
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
#sc-btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5); }

/* ─── WELCOME SCREEN ────────────────────── */
#sc-welcome {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(5, 8, 16, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#sc-welcome.sc-in { opacity: 1; visibility: visible; pointer-events: all; }
#sc-welcome.sc-out { opacity: 0; pointer-events: none; }

.sc-wcard {
  background: var(--sc-tour-bg);
  border: 1px solid var(--sc-tour-border);
  border-radius: 32px;
  padding: 48px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--sc-tour-shadow);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#sc-welcome.sc-in .sc-wcard { transform: scale(1); }

.sc-w-icon { font-size: 4rem; margin-bottom: 24px; }

.sc-wcard h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--sc-tour-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sc-wcard p {
  color: var(--sc-tour-muted);
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 32px;
}

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

.sc-btn-primary {
  background: linear-gradient(135deg, var(--sc-tour-primary), var(--sc-tour-accent));
  border: none;
  color: #fff;
  padding: 16px 36px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}
.sc-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6); }

.sc-btn-ghost {
  background: transparent;
  border: 1px solid var(--sc-tour-border);
  color: var(--sc-tour-muted);
  padding: 16px 24px;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.sc-btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

/* ─── TOAST & RESTART ───────────────────── */
#sc-tour-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 100px);
  z-index: 100001;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  padding: 16px 32px;
  border-radius: 100px;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s;
  opacity: 0;
}
#sc-tour-toast.show { transform: translate(-50%, 0); opacity: 1; }
#sc-tour-toast strong { display: block; font-size: 1.1rem; margin-bottom: 2px; }
#sc-tour-toast p { margin: 0; font-size: 0.85rem; opacity: 0.9; }

#sc-restart-btn {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 9995;
  width: 54px;
  height: 54px;
  border-radius: 100px;
  background: var(--sc-tour-bg);
  border: 1px solid var(--sc-tour-border);
  color: var(--sc-tour-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
#sc-restart-btn.sc-restart-show { opacity: 1; transform: scale(1); pointer-events: all; }
#sc-restart-btn:hover { transform: rotate(45deg) scale(1.1); color: #fff; background: var(--sc-tour-primary); }
#sc-restart-btn svg { width: 24px; height: 24px; }

/* ─── RESPONSIVE ───────────────────────── */
@media (max-width: 480px) {
  .sc-wcard { padding: 32px 24px; }
  .sc-w-btns { flex-direction: column; }
  .sc-btn-primary, .sc-btn-ghost { width: 100%; }
}
