/* ============================================================
   TUTORIAL COMPONENT — Interactive how-to-create-a-quiz demo
   Used in: landing page (inline), help button (modal)
   ============================================================ */

.tutorial-container {
  max-width: 580px; width: 100%; background: #1a1a2e;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin: 0 auto;
}
.tutorial-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tutorial-title { color: white; font-weight: 700; font-size: 0.85rem; }
.tutorial-step-indicator { color: rgba(255,255,255,0.5); font-size: 0.75rem; }

.tutorial-slides { position: relative; min-height: 380px; overflow: hidden; }

.tutorial-slide {
  position: absolute; inset: 0; padding: 24px 20px;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateX(40px); transition: all 0.4s ease; pointer-events: none;
}
.tutorial-slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }

.slide-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #6366f1; color: white; font-weight: 800; font-size: 0.75rem;
  margin-bottom: 10px;
}
.slide-title { color: white; font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.slide-desc { color: rgba(255,255,255,0.6); font-size: 0.82rem; line-height: 1.4; margin-bottom: 14px; }

/* Method chooser */
.method-grid { display: flex; flex-direction: column; gap: 10px; }
.method-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
  color: white; cursor: pointer; transition: all 0.2s; text-align: left; width: 100%;
}
.method-btn:hover { border-color: #6366f1; background: rgba(99,102,241,0.1); transform: translateX(4px); }
.method-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.method-icon-tg { background: rgba(0,136,204,0.15); }
.method-icon-web { background: rgba(99,102,241,0.15); }
.method-icon-ai { background: rgba(245,158,11,0.15); }
.method-text strong { display: block; font-size: 0.85rem; margin-bottom: 2px; }
.method-text span { font-size: 0.72rem; color: rgba(255,255,255,0.5); }

/* ─── Telegram mockup ─── */
.tg-mock { border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); background: #0e1621; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.tg-mock-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #17212b; border-bottom: 1px solid rgba(255,255,255,0.06); }
.tg-mock-back { color: #3390ec; font-size: 1.1rem; font-weight: 300; }
.tg-mock-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 0.65rem; }
.tg-mock-info { flex: 1; }
.tg-mock-name { font-size: 0.7rem; font-weight: 600; color: white; }
.tg-mock-status { font-size: 0.55rem; color: #3390ec; }
.tg-mock-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; max-height: 240px; overflow: hidden; }
.tg-msg { padding: 6px 10px; border-radius: 10px; font-size: 0.65rem; max-width: 85%; line-height: 1.4; }
.tg-msg-user { background: #2b5278; color: white; align-self: flex-end; border-radius: 10px 10px 2px 10px; }
.tg-msg-bot { background: #182533; color: #e4ecf2; align-self: flex-start; border-radius: 10px 10px 10px 2px; }
.tg-inline-btns { display: flex; gap: 4px; flex-wrap: wrap; align-self: flex-start; margin: 2px 0; }
.tg-inline-btn { padding: 4px 8px; border-radius: 6px; font-size: 0.58rem; font-weight: 500; background: transparent; color: #3390ec; border: 1px solid rgba(51,144,236,0.3); }
.tg-inline-btn-active { background: rgba(51,144,236,0.1); border-color: #3390ec; }
.tg-inline-btn-green { color: #06d6a0; border-color: rgba(6,214,160,0.3); background: rgba(6,214,160,0.08); }
.tg-mock-input { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #17212b; border-top: 1px solid rgba(255,255,255,0.06); }
.tg-input-field { flex: 1; padding: 6px 10px; border-radius: 16px; background: #0e1621; border: 1px solid rgba(255,255,255,0.08); font-size: 0.6rem; color: #8e8e93; }
.tg-send-btn { width: 26px; height: 26px; border-radius: 50%; background: #3390ec; color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; }

/* ─── App (website) mockup ─── */
.app-mock { border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); background: #fafbff; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.app-mock-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); color: white; }
.app-mock-brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.7rem; }
.app-mock-logo { width: 22px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #1a1a2e, #0f3460); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 900; border: 1px solid rgba(255,255,255,0.2); }
.app-mock-user { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.12); padding: 3px 8px; border-radius: 999px; font-size: 0.6rem; font-weight: 600; }
.app-mock-avatar { width: 16px; height: 16px; border-radius: 50%; background: #6366f1; display: flex; align-items: center; justify-content: center; font-size: 0.45rem; font-weight: 700; color: white; }
.app-mock-tabs { display: flex; gap: 3px; padding: 6px 8px; background: #f0f4ff; border-bottom: 1px solid #e4e8f7; }
.app-mock-tab { padding: 4px 10px; border-radius: 999px; font-size: 0.58rem; font-weight: 600; color: #6c6c8a; }
.app-mock-tab.active { background: #16213e; color: white; }
.app-mock-body { padding: 10px 12px; }
.app-mock-toolbar { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.app-mock-btn { padding: 5px 9px; border-radius: 8px; font-size: 0.6rem; font-weight: 600; background: #16213e; color: white; border: none; display: inline-block; }
.app-mock-btn-sec { padding: 5px 9px; border-radius: 8px; font-size: 0.6rem; font-weight: 600; background: white; color: #1a1a2e; border: 1px solid #e4e8f7; display: inline-block; }
.app-mock-btn-grad { padding: 5px 9px; border-radius: 8px; font-size: 0.6rem; font-weight: 600; background: linear-gradient(135deg, #1a1a2e, #0f3460); color: white; border: none; display: inline-block; }
.app-mock-table { width: 100%; border-collapse: collapse; font-size: 0.58rem; }
.app-mock-table th { text-align: left; padding: 5px 6px; background: #f0f4ff; font-weight: 700; color: #6c6c8a; border-bottom: 1px solid #e4e8f7; }
.app-mock-table td { padding: 6px; border-bottom: 1px solid #f0f4ff; color: #1a1a2e; }
.app-mock-table .badge-easy { background: #ecfdf8; color: #06d6a0; padding: 1px 5px; border-radius: 999px; font-size: 0.5rem; font-weight: 700; }
.app-mock-table .badge-med { background: #fffbeb; color: #f59e0b; padding: 1px 5px; border-radius: 999px; font-size: 0.5rem; font-weight: 700; }
.act-btns { display: flex; gap: 3px; }
.act-btn { padding: 2px 5px; border-radius: 4px; font-size: 0.5rem; font-weight: 600; background: #f0f4ff; color: #16213e; display: inline-block; }
.act-btn-live { background: #e21b3c; color: white; }
.act-btn-share { background: #16213e; color: white; }
.app-mock-card { background: white; border: 1px solid #e4e8f7; border-radius: 10px; padding: 10px 12px; box-shadow: 0 2px 6px rgba(67,97,238,0.06); }
.app-mock-card-title { font-size: 0.7rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.app-mock-upload { border: 2px dashed #c7cee8; border-radius: 10px; padding: 16px; text-align: center; background: #f8faff; }
.app-mock-upload-icon { font-size: 1.3rem; margin-bottom: 4px; }
.app-mock-upload-text { font-size: 0.62rem; font-weight: 600; color: #6c6c8a; }
.app-mock-upload-hint { font-size: 0.55rem; color: #a0a0c0; margin-top: 3px; }
.app-mock-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.app-mock-field { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: #fafbff; border: 1px solid #e4e8f7; border-radius: 8px; }
.app-mock-field-label { font-size: 0.58rem; color: #6c6c8a; }
.app-mock-field-value { font-size: 0.58rem; font-weight: 700; color: #1a1a2e; }
.app-mock-toggle { width: 24px; height: 14px; border-radius: 7px; background: #06d6a0; position: relative; display: inline-block; }
.app-mock-toggle::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: white; top: 2px; right: 2px; }
.app-mock-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 0.55rem; font-weight: 700; }
.app-mock-badge-success { background: #ecfdf8; color: #06d6a0; }
.app-mock-badge-info { background: #e8edf5; color: #16213e; }

/* Quiz player mockup */
.quiz-mock-options { display: flex; flex-direction: column; gap: 4px; }
.quiz-mock-opt { padding: 7px 10px; border-radius: 8px; font-size: 0.62rem; font-weight: 500; background: #fafbff; border: 1.5px solid #e4e8f7; color: #1a1a2e; }
.quiz-mock-opt-selected { border-color: #16213e; background: #e8edf5; font-weight: 600; box-shadow: 0 0 0 2px rgba(22,33,62,0.1); }

/* Results mockup */
.result-mock-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; margin-bottom: 3px; font-size: 0.58rem; font-weight: 500; }
.result-correct { background: #ecfdf8; color: #06d6a0; }
.result-wrong { background: #fef1f4; color: #ef476f; }

/* Progress & controls */
.tutorial-progress { display: flex; gap: 4px; padding: 10px 16px; justify-content: center; }
.tutorial-progress .progress-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: all 0.3s ease; cursor: pointer; }
.tutorial-progress .progress-dot.active { background: #6366f1; width: 24px; border-radius: 4px; }
.tutorial-controls { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 14px; }
.tut-btn { padding: 8px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; }
.tut-btn-ghost { background: transparent; color: rgba(255,255,255,0.5); }
.tut-btn-ghost:hover { color: white; }
.tut-btn-primary { background: #6366f1; color: white; }
.tut-btn-primary:hover { background: #4f46e5; transform: translateY(-1px); }
.slide-cta { display: inline-block; margin-top: 12px; padding: 9px 18px; background: #6366f1; color: white; border-radius: 8px; text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: all 0.2s; }
.slide-cta:hover { background: #4f46e5; }

/* Floating help button */
.help-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: all 0.2s;
}
.help-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(99,102,241,0.5); }

/* Tutorial modal overlay */
.tutorial-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,15,30,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.tutorial-modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 1.5rem; cursor: pointer; z-index: 10;
}
.tutorial-modal-close:hover { color: white; }

@media (max-width: 600px) {
  .tutorial-container { border-radius: 12px; }
  .tutorial-slides { min-height: 340px; }
  .tutorial-slide { padding: 18px 14px; }
  .slide-title { font-size: 0.95rem; }
  .method-btn { padding: 10px 12px; }
  .method-icon { width: 34px; height: 34px; font-size: 1rem; }
}
