/**
 * Onboarding-specific styles for BLD Memory Trainer
 */

/* Onboarding Screen Layout */
#onboarding-screen {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#onboarding-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Onboarding Header */
.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 20px 20px 0 0;
}

.progress-indicator {
  flex: 1;
}

.progress-text {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  display: block;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.skip-btn {
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.skip-btn:hover {
  color: #374151;
}

/* Onboarding Content */
.onboarding-content {
  padding: 2rem;
}

.screen-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.screen-content {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 2rem;
}

.screen-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.screen-note {
  background: #f1f5f9;
  border-left: 4px solid #38bdf8;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: #0f172a;
  font-size: 1rem;
}

.rule-list,
.checklist {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-list li,
.checklist li {
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  font-size: 1rem;
}

.media-frame {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid #1e293b;
  padding: 1.25rem;
  text-align: center;
  color: #e2e8f0;
}

.media-frame figure {
  margin: 0;
}

.media-frame img,
.media-frame video {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #1e293b;
  padding: 0.5rem;
}

.media-frame figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.media-placeholder {
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5f5;
  font-size: 0.95rem;
}

.media-toggle {
  display: inline-flex;
  gap: 0.5rem;
  background: #e0e7ff;
  padding: 0.5rem;
  border-radius: 999px;
  align-self: center;
}

.media-toggle-btn {
  border: none;
  background: transparent;
  color: #3730a3;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-toggle-btn.active {
  background: #4338ca;
  color: #f8fafc;
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.25);
}

.media-toggle-btn:hover {
  background: rgba(67, 56, 202, 0.15);
}

.callout-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.callout-card {
  display: flex;
  gap: 1rem;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  align-items: center;
}

.callout-card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

.callout-card p {
  margin: 0;
  font-size: 0.95rem;
}

.callout-icon {
  font-size: 1.75rem;
}

.callout-info {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.callout-warning {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}

.callout-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #047857;
}

.quiz-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quiz-card.quiz-correct {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.quiz-card.quiz-incorrect {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
}

.quiz-prompt {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: #6b7280;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quiz-option {
  background: white;
  border: 1px solid #cbd5f5;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1f2937;
}

.quiz-option:hover:not(:disabled) {
  border-color: #4338ca;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.quiz-option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-feedback {
  font-size: 0.95rem;
  min-height: 1.5rem;
  color: #4338ca;
}

.quiz-feedback[data-state="success"] {
  color: #047857;
  font-weight: 600;
}

.quiz-feedback[data-state="error"] {
  color: #b45309;
  font-weight: 500;
}

.stepper-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stepper-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
}

.step-index {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4338ca;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.step-letter {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.step-arrow {
  color: #6366f1;
  font-size: 1.1rem;
}

.chunk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.chunk-card {
  background: #f1f5f9;
  border: 1px solid #cbd5f5;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.chunk-index {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.chunk-value {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
}

.journal-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.journal-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 0.5rem;
  align-items: center;
}

.journal-pair {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
}

.journal-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5f5;
  border-radius: 10px;
  font-size: 0.95rem;
}

.journal-input:focus {
  outline: none;
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

.execution-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #1f2937;
}

.execution-note,
.stepper-note,
.chunking-note,
.journal-tip,
.checklist-note {
  margin-top: 1rem;
  background: #eef2ff;
  border-left: 4px solid #4338ca;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: #312e81;
  font-size: 0.95rem;
}

.demo-checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #166534;
}

.demo-checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #047857;
}
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Welcome Screen Styles */
.welcome-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 1rem;
}

.success-stats {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.success-stats p {
  margin: 0;
  color: #0369a1;
  font-weight: 500;
}

/* Process Diagram */
.process-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

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

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.arrow {
  font-size: 2rem;
  color: #667eea;
  font-weight: bold;
}

.focus-text {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-weight: 500;
  color: #92400e;
}

/* Notation Examples */
.notation-example {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.cube-diagram {
  text-align: center;
  margin: 1.5rem 0;
}

.speffz-visual {
  background: #1f2937;
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
}

.reassurance {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-weight: 500;
  color: #065f46;
}

/* Piece Comparison */
.piece-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.piece-type {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.piece-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.piece-icon.edge {
  color: #3b82f6;
}

.piece-icon.corner {
  color: #ef4444;
}

.vs {
  font-size: 1.5rem;
  font-weight: bold;
  color: #6b7280;
}

.cycle-explanation {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.encouragement {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  font-style: italic;
  color: #0369a1;
}

/* Story Examples */
.example-story {
  background: #fef7ff;
  border: 1px solid #d8b4fe;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.story-step {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: white;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
}

.interactive-demo {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

.demo-pair {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  justify-content: center;
}

.pair-display {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  background: #f3f4f6;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  min-width: 60px;
}

.demo-input {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  min-width: 200px;
}

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

/* Drill Types */
.drill-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.drill-type {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.drill-type h4 {
  margin: 0 0 0.5rem 0;
  color: #1f2937;
  font-size: 1rem;
}

.drill-type p {
  margin: 0;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Notation Demo */
.notation-demo {
  background: #fef7ff;
  border: 1px solid #d8b4fe;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.demo-example {
  text-align: center;
  margin: 1rem 0;
}

.cube-piece-demo {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: inline-block;
}

.color-squares {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.square {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid #374151;
}

.notation-input {
  font-size: 1.5rem;
  text-align: center;
  width: 60px;
  padding: 0.5rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  margin: 1rem 0;
}

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

.training-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.mode {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.mode h4 {
  margin: 0 0 0.5rem 0;
  color: #0369a1;
}

.mode p {
  margin: 0;
  color: #0284c7;
  font-size: 0.875rem;
}

/* Recall Demo */
.recall-process {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.example-feedback {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
}

.rating-system {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.rating-example {
  text-align: center;
  margin: 1rem 0;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Dashboard Preview */
.dashboard-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.stats-example {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.achievements {
  background: #fef7ff;
  border: 1px solid #d8b4fe;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.motivation {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-weight: 500;
  color: #065f46;
}

/* Account Creation */
.account-benefits {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.account-benefits ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.account-benefits li {
  margin: 0.5rem 0;
  color: #0369a1;
}

.privacy-note {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.skip-option {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 1rem;
  margin: 1.5rem 0;
  color: #92400e;
}

.final-encouragement {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  font-weight: 500;
  color: #065f46;
}

/* Interactive Elements */
.interactive-elements {
  margin: 2rem 0;
  text-align: center;
}

.interactive-elements .btn {
  margin: 0.5rem;
}

.btn-demo {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Navigation */
.onboarding-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 20px 20px;
}

.navigation-dots {
  display: flex;
  gap: 0.5rem;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: #667eea;
  transform: scale(1.2);
}

.nav-dot.completed {
  background: #10b981;
}

.nav-dot:hover {
  background: #9ca3af;
}

/* Completion Screen */
.onboarding-completion {
  text-align: center;
  padding: 2rem;
}

.completion-header {
  margin-bottom: 2rem;
}

.completion-header h1 {
  font-size: 2.5rem;
  color: #1f2937;
  margin-bottom: 1rem;
}

.recommendations {
  background: #f8fafc;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.recommended-drill {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.next-steps {
  margin-top: 1.5rem;
}

.next-steps ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.completion-actions {
  margin-top: 2rem;
}

.completion-actions .btn {
  margin: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  #onboarding-container {
    margin: 1rem;
    max-height: 95vh;
  }
  
  .onboarding-content {
    padding: 1.5rem;
  }
  
  .screen-title {
    font-size: 1.5rem;
  }
  
  .process-diagram {
    flex-direction: column;
    gap: 1rem;
  }
  
  .arrow {
    transform: rotate(90deg);
  }
  
  .piece-comparison {
    flex-direction: column;
    gap: 1rem;
  }
  
  .onboarding-navigation {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .navigation-dots {
    order: -1;
  }
}

@media (max-width: 480px) {
  .screen-title {
    font-size: 1.25rem;
  }
  
  .screen-content {
    font-size: 1rem;
  }
  
  .pair-display {
    font-size: 1.5rem;
  }
  
  .demo-input {
    min-width: 150px;
  }
}
