/* ═══════════════════════════════════════════════
   ES-DE Onboarding Tutorial — Stylesheet
   ENG-55: Multi-slide walkthrough modal
   ═══════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.onboarding-overlay.visible {
  opacity: 1;
}

/* ── Card ────────────────────────────────────── */
.onboarding-card {
  position: relative;
  width: 92vw;
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 35, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(99, 102, 241, 0.08);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease-out;
}

.onboarding-overlay.visible .onboarding-card {
  transform: translateY(0) scale(1);
}

/* ── Close button ────────────────────────────── */
.onboarding-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s;
}

.onboarding-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ── Slides container ────────────────────────── */
.onboarding-slides-viewport {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.onboarding-slides-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

/* ── Individual slide ────────────────────────── */
.onboarding-slide {
  min-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 2rem 2rem 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.onboarding-slide::-webkit-scrollbar {
  width: 4px;
}

.onboarding-slide::-webkit-scrollbar-track {
  background: transparent;
}

.onboarding-slide::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.25);
  border-radius: 4px;
}

/* ── Slide content ───────────────────────────── */
.onboarding-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}

.onboarding-body {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
}

.onboarding-body strong {
  color: #fff;
  font-weight: 600;
}

.onboarding-body .highlight {
  color: #818cf8;
  font-weight: 600;
}

/* ── Slide images (screenshots / diagrams) ──── */
.onboarding-image {
  width: 100%;
  max-width: 440px;
  margin: 1rem auto 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.onboarding-image.controller-diagram {
  max-width: 400px;
}

/* ── Restart icon (inline SVG on restart slide) ── */
.onboarding-restart-icon {
  width: 64px;
  height: 64px;
  margin: 0.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.onboarding-restart-icon svg {
  width: 36px;
  height: 36px;
  stroke: rgba(255, 255, 255, 0.6);
}

/* ── Pro tip callout ─────────────────────────── */
.onboarding-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  font-size: 0.8rem;
  color: #a5b4fc;
}

/* ── Tips box (combined bullet list) ─────────── */
.onboarding-tips-box {
  margin-top: 0.75rem;
  padding: 10px 16px 10px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  text-align: left;
}

.onboarding-tips-box ul {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: disc;
}

.onboarding-tips-box li {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #a5b4fc;
}

.onboarding-tips-box li + li {
  margin-top: 4px;
}

.onboarding-tips-box li strong {
  color: #c7d2fe;
}

.onboarding-tips-box > strong {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c7d2fe;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Inline gamepad button icons ─────────────── */
.onboarding-tip .gamepad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  margin: 0 1px;
}

.gamepad-btn-xbox {
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.gamepad-btn-ps {
  background: rgba(99, 155, 255, 0.15);
  border: 1.5px solid rgba(99, 155, 255, 0.4);
  color: #93bbff;
  font-size: 0.75rem;
}

/* ── Dot navigation ──────────────────────────── */
.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 1rem 0 0.25rem;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s;
  padding: 0;
}

.onboarding-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.onboarding-dot.active {
  background: #6366f1;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

/* ── Footer ──────────────────────────────────── */
.onboarding-footer {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

/* ── Dismiss toggle ──────────────────────────── */
.onboarding-dismiss {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.onboarding-toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  flex-shrink: 0;
}

.onboarding-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.onboarding-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  transition: background 0.25s ease;
  cursor: pointer;
}

.onboarding-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #94a3b8;
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.onboarding-toggle-switch input:checked + .onboarding-toggle-slider {
  background: #6366f1;
}

.onboarding-toggle-switch input:checked + .onboarding-toggle-slider::before {
  transform: translateX(16px);
  background: #fff;
}

.onboarding-dismiss label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

/* ── Navigation buttons ──────────────────────── */
.onboarding-nav {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.onboarding-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.onboarding-btn-back {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.onboarding-btn-next {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.onboarding-btn-next:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

/* ── Discord community slide ─────────────────── */
.onboarding-discord-icon {
  width: 72px;
  height: 72px;
  margin: 0.5rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.25);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.15);
}

.onboarding-discord-icon svg {
  width: 38px;
  height: 38px;
  color: #5865f2;
}

.onboarding-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 1rem auto 0.75rem;
  padding: 12px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.onboarding-discord-btn:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.onboarding-discord-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 500px) {
  .onboarding-slide {
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .onboarding-footer {
    padding: 0.75rem 1.25rem 1.25rem;
  }

  .onboarding-title {
    font-size: 1.1rem;
  }

  .onboarding-body {
    font-size: 0.85rem;
  }

  .onboarding-image {
    max-width: 100%;
  }
}
