/* ═══════════════════════════════════════════════════════
   WORST ONBOARDING EVER — Level Styles
   These should look like REAL product interfaces.
   Clean enough to be believable, terrible enough to be funny.
   ═══════════════════════════════════════════════════════ */

/* ── Level 1: Welcome Modal From Hell ──────────────── */
.l1-page {
  width: 100%;
  height: 100%;
  background: #f5f6fa;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.l1-content-behind {
  padding: 4rem;
  text-align: center;
  color: #333;
}

.l1-content-behind h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.l1-content-behind p { color: #888; }

.l1-next-btn {
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.l1-overlay {
  position: fixed;
  inset: 0;
  top: 48px;
  background: rgba(0,0,0,0.6);
  z-index: 200;
}

.l1-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 520px;
  width: 90%;
  z-index: 300;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  color: #333;
}

.l1-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 10px;
  color: #ccc;
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.l1-close-btn:hover { color: #999; background: #f0f0f0; }

.l1-modal h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.l1-modal p { color: #666; line-height: 1.6; margin-bottom: 0.75rem; font-size: 0.9rem; }

.l1-modal-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.l1-modal-btn-primary {
  padding: 0.6rem 1.5rem;
  background: #4a69dd;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.l1-modal-btn-secondary {
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.l1-modal-confirm { background: #fff9f0; border: 2px solid #ffc107; }

.l1-btn-swap-yes {
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.l1-btn-swap-no {
  padding: 0.6rem 1.2rem;
  background: #4a69dd;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.l1-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: white;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 250;
  font-size: 0.85rem;
}

.l1-cookie-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.l1-cookie-accept {
  padding: 0.6rem 1.5rem;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.l1-cookie-reject {
  padding: 0.6rem 1.5rem;
  background: transparent;
  color: #666;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.4;
}

.l1-cookie-reject-real {
  background: none;
  border: none;
  color: #444;
  font-size: 0.6rem;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Level 2: Registration Wall ────────────────────── */
.l2-page {
  width: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.l2-form-wrapper {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  color: #333;
}

.l2-form-wrapper h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.l2-subtitle { color: #888; font-size: 0.85rem; margin-bottom: 1.5rem; }

.l2-field {
  margin-bottom: 1.25rem;
}

.l2-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #444;
}

.l2-field input, .l2-field select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

.l2-field input:focus, .l2-field select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.l2-hint {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.25rem;
  display: block;
}

.l2-pw-rules {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.l2-rule {
  font-size: 0.72rem;
  color: #e74c3c;
}

.l2-rule-pass {
  color: #27ae60;
}

.l2-checkbox-field {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.4;
}

.l2-checkbox-field input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.l2-submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s;
}

.l2-submit-btn:hover { background: #5a6fd6; }

.l2-skip-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: #aaa;
}

.l2-skip-link span {
  color: #ccc;
  cursor: pointer;
  font-size: 0.65rem;
}

.l2-skip-link span:hover {
  text-decoration: underline;
  color: #999;
}

/* ── Level 3: Tooltip Tour ─────────────────────────── */
.l3-dashboard {
  display: flex;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333;
  position: relative;
}

.l3-sidebar {
  width: 220px;
  background: #1e293b;
  color: white;
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.l3-logo {
  padding: 0 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.l3-nav-item {
  display: block;
  padding: 0.65rem 1.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.l3-nav-item:hover { background: #334155; color: #e2e8f0; }
.l3-nav-item.active { background: #334155; color: white; }

.l3-main {
  flex: 1;
  background: #f8fafc;
  padding: 1.5rem 2rem;
}

.l3-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.l3-header h2 { font-size: 1.3rem; font-weight: 600; }

.l3-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.l3-btn {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.l3-btn-icon {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
}

.l3-avatar {
  width: 32px;
  height: 32px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.l3-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.l3-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.l3-card h4 {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.l3-stat {
  font-size: 2rem;
  font-weight: 700;
}

/* Tooltip overlay */
.l3-tooltip-overlay {
  position: fixed;
  inset: 0;
  top: 48px;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  cursor: not-allowed;
}

.l3-tooltip {
  position: fixed;
  z-index: 600;
  background: #1e293b;
  color: white;
  padding: 1.25rem;
  border-radius: 8px;
  max-width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  font-size: 0.85rem;
  line-height: 1.5;
}

.l3-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 16px;
  width: 12px;
  height: 12px;
  background: #1e293b;
  transform: rotate(45deg);
}

.l3-tooltip-counter {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.l3-tooltip-next {
  display: block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
}

/* When tooltip should cover its own Next button — visually hidden but still clickable */
.l3-tooltip-cover-next .l3-tooltip-next {
  position: relative;
  opacity: 0.08;
}

/* After a beat, reveal it */
.l3-tooltip-cover-next::after {
  content: '(the button is behind this tooltip. classic.)';
  display: block;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: #94a3b8;
  font-style: italic;
}

.l3-tooltip-highlight {
  position: relative;
  z-index: 450;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

.l3-tour-done {
  text-align: center;
  padding: 3rem;
}

.l3-tour-done h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.l3-tour-done p { color: #64748b; margin-bottom: 0.5rem; }
.l3-tour-stats { font-size: 0.8rem; color: #94a3b8; }

.l3-done-btn {
  margin-top: 1.5rem;
  padding: 0.7rem 2rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

/* ── Level 4: Empty State Abyss ────────────────────── */
.l4-dashboard {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333;
}

.l4-sidebar {
  width: 220px;
  background: #fafbfc;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem 0;
  position: fixed;
  top: 48px;
  bottom: 0;
  left: 0;
}

.l4-logo {
  padding: 0 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

.l4-nav-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.l4-nav-item:hover { background: #f3f4f6; color: #111; }
.l4-nav-item.active { background: #e5e7eb; color: #111; font-weight: 500; }

.l4-main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  min-height: calc(100vh - 48px);
  background: white;
}

.l4-empty {
  text-align: center;
}

.l4-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.l4-empty h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.l4-empty-text {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.l4-cta-btn {
  padding: 0.8rem 2.5rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.2s;
}

.l4-cta-btn:hover {
  background: #4f46e5;
}

.l4-empty-sub {
  margin-top: 2rem;
  text-align: center;
}

.l4-empty-sub p { color: #9ca3af; font-size: 0.85rem; margin-bottom: 0.75rem; }

.l4-sub-btn {
  padding: 0.5rem 1.5rem;
  background: transparent;
  color: #6366f1;
  border: 1px solid #6366f1;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.l4-feedback {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  animation: feedbackIn 0.3s ease;
  white-space: nowrap;
}

@keyframes feedbackIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.l4-footer {
  position: fixed;
  bottom: 0;
  left: 220px;
  right: 0;
  padding: 0.6rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: #d1d5db;
  background: white;
  border-top: 1px solid #f3f4f6;
}

.l4-footer span { cursor: default; }

.l4-hidden-link {
  color: #eeefef;
  cursor: pointer;
  font-size: 0.6rem;
  transition: color 0.3s;
}

.l4-hidden-link:hover {
  color: #9ca3af;
}

/* ── Level 5: Grand Finale ─────────────────────────── */
.l5-chaos {
  width: 100%;
  height: 100%;
  background: #f0f4f8;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333;
}

.l5-bg-dashboard {
  padding: 2rem;
}

.l5-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.l5-header h2 { font-size: 1.3rem; }

.l5-progress-bar {
  width: 200px;
  height: 24px;
  background: #e2e8f0;
  border-radius: 12px;
  position: relative;
  overflow: visible;
}

.l5-progress-fill {
  width: 150%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #ef4444);
  border-radius: 12px;
}

.l5-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.l5-overlay {
  position: fixed;
  inset: 0;
  top: 48px;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}

.l5-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 85%;
  z-index: 300;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.l5-modal h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.l5-modal p { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }

.l5-modal-btn {
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  margin: 0 0.25rem;
}

.l5-modal-btn-primary {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.l5-modal-2 { transform: translate(-45%, -55%); }
.l5-modal-3 { transform: translate(-55%, -45%); }

.l5-nps-row {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.l5-nps-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.l5-nps-btn:hover { background: #ef4444; color: white; border-color: #ef4444; }

.l5-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 250;
  font-size: 0.85rem;
}

.l5-cookie-btn {
  padding: 0.5rem 1.25rem;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.l5-tooltip {
  position: fixed;
  top: 30%;
  right: 5%;
  z-index: 280;
  background: #1e293b;
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  max-width: 260px;
  font-size: 0.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.l5-tooltip-counter {
  font-size: 0.6rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  display: block;
}

.l5-tooltip-dismiss {
  margin-top: 0.75rem;
  padding: 0.3rem 0.8rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.l5-form-floating {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 260;
  text-align: center;
}

.l5-form-floating h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.l5-input {
  width: 220px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-family: inherit;
}

.l5-form-submit {
  padding: 0.4rem 1rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
}

.l5-survived-btn {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9000;
  background: transparent;
  color: #c5c5c5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.l5-survived-btn:hover {
  opacity: 1;
  color: #333;
  border-color: #999;
}
