#ttc-course-container {
  max-width: 700px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px #0002;
  padding: 32px 24px;
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
}
#lesson-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 1.3em;
  margin-bottom: 12px;
}
#lesson-header button {
  background: #4f8cff;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.2s;
}
#lesson-header button:disabled { opacity: 0.5; cursor: not-allowed; }
#lesson-header button:hover:not(:disabled) { background: #2563eb; }
#lesson-title { font-weight: bold; }
#lesson-description { color: #444; margin-bottom: 18px; }
#exercise-area { margin-bottom: 24px; }
#exercise-title { font-size: 1.1em; font-weight: bold; margin-bottom: 4px; }
#exercise-description { color: #666; margin-bottom: 8px; }
#text-to-type {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.2em;
  margin-bottom: 8px;
  min-height: 40px;
  letter-spacing: 2px;
  direction: rtl;
}
#typing-input {
  width: 100%;
  font-size: 1.1em;
  padding: 10px;
  border: 2px solid #4f8cff;
  border-radius: 8px;
  margin-bottom: 10px;
  direction: rtl;
}
#exercise-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
  font-size: 1em;
  color: #333;
}
#next-exercise {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
#next-exercise:hover { background: #16a34a; }
#keyboard-area {
  margin: 32px 0 12px 0;
  text-align: center;
}
.virtual-keyboard {
  display: inline-block;
  background: #e0e7ef;
  border-radius: 12px;
  padding: 18px 12px;
  box-shadow: 0 2px 12px #0001;
}
.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.keyboard-key, .key {
  background: #fff;
  border: 2px solid #b6c6e0;
  border-radius: 6px;
  min-width: 36px;
  min-height: 36px;
  font-size: 1.1em;
  font-weight: bold;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border 0.15s;
  cursor: pointer;
  user-select: none;
}
.keyboard-key.focus, .key.focus {
  background: #4f8cff;
  color: #fff;
  border-color: #2563eb;
}
.keyboard-key.pressed, .key.pressed {
  background: #22c55e;
  color: #fff;
  border-color: #16a34a;
}
.hand-visual {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 0 0;
}
.finger {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95em;
  color: #333;
  text-align: center;
  min-width: 48px;
}
.finger-letter {
  font-size: 1.2em;
  font-weight: bold;
  color: #4f8cff;
}
.focus-in-text {
  color: #4f8cff;
  font-weight: bold;
  text-decoration: underline;
}
.ttc-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0007;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.ttc-modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 4px 32px #0003;
  text-align: center;
  min-width: 260px;
}
#ttc-modal-message {
  font-size: 1.1em;
  margin-bottom: 18px;
  display: block;
}
#ttc-modal-close {
  background: #4f8cff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
#ttc-modal-close:hover { background: #2563eb; }
@media (max-width: 600px) {
  #ttc-course-container { padding: 10px; }
  .keyboard-row { gap: 2px; }
  .key, .keyboard-key { min-width: 28px; min-height: 28px; font-size: 0.9em; }
  .key.space { min-width: 100px; }
} 
/* ===================== כפתורים כלליים ===================== */
.ttc-btn {
  display: inline-block;
  background: #4f8cff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 1em;
  font-family: 'Heebo', Arial, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.ttc-btn:hover { background: #2563eb; color: #fff; }
.ttc-btn-secondary { background: #e2e8f0; color: #1e293b; }
.ttc-btn-secondary:hover { background: #cbd5e1; color: #1e293b; }
.ttc-btn-large { padding: 14px 40px; font-size: 1.15em; }
.ttc-btn-disabled, .ttc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===================== לוח הבקרה ===================== */
.ttc-student-dashboard {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px;
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
  color: #1e293b;
}
.ttc-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.ttc-welcome-section h1 { margin: 0 0 4px 0; font-size: 1.8em; }
.ttc-dashboard-subtitle { margin: 0; color: #64748b; }
.ttc-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.ttc-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 2px 12px #0000000d;
}
.ttc-stat-card .ttc-stat-number {
  font-size: 2.1em;
  font-weight: 700;
  color: #4f8cff;
  line-height: 1.1;
}
.ttc-stat-card .ttc-stat-label {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.92em;
}
.ttc-dashboard-cta { text-align: center; margin-bottom: 36px; }
.ttc-lessons-section h2 { font-size: 1.4em; margin-bottom: 16px; }
.ttc-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.ttc-lesson-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 12px #0000000d;
}
.ttc-lesson-card.ttc-lesson-completed { border-color: #22c55e; background: #f0fdf4; }
.ttc-lesson-header { display: flex; flex-direction: column; gap: 8px; }
.ttc-lesson-header h3 { margin: 0; font-size: 1.05em; line-height: 1.4; }
.ttc-lesson-status {
  align-self: flex-start;
  font-size: 0.82em;
  padding: 3px 10px;
  border-radius: 999px;
}
.ttc-status-completed { background: #dcfce7; color: #15803d; }
.ttc-status-available { background: #e0edff; color: #2563eb; }
.ttc-lesson-stats {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  font-size: 0.9em;
  color: #475569;
}
.ttc-lesson-stat .ttc-stat-value { font-weight: 700; color: #1e293b; }

/* ===================== טפסים (הרשמה והתחברות) ===================== */
.ttc-registration-form, .ttc-login-form {
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
}
.ttc-form-container {
  max-width: 460px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px #0000000f;
  color: #1e293b;
}
.ttc-form-title { margin: 0 0 6px 0; font-size: 1.6em; text-align: center; }
.ttc-form-description { margin: 0 0 22px 0; color: #64748b; text-align: center; }
.ttc-form-group { margin-bottom: 16px; }
.ttc-form-label { display: block; margin-bottom: 6px; font-weight: 600; }
.ttc-form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  direction: rtl;
  transition: border 0.15s;
}
.ttc-form-input:focus { outline: none; border-color: #4f8cff; }
.ttc-input-error { border-color: #ef4444; }
.ttc-form-hint { margin-top: 5px; font-size: 0.85em; color: #94a3b8; }
.ttc-form-error { margin-top: 5px; font-size: 0.85em; color: #ef4444; }
.ttc-form-submit {
  width: 100%;
  background: #4f8cff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 1.05em;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.ttc-form-submit:hover { background: #2563eb; }
.ttc-form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.ttc-form-footer { margin-top: 18px; text-align: center; color: #64748b; }
.ttc-link { color: #4f8cff; text-decoration: none; font-weight: 600; }
.ttc-link:hover { text-decoration: underline; }
.ttc-loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff80;
  border-top-color: #fff;
  border-radius: 50%;
  animation: ttc-spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes ttc-spin { to { transform: rotate(360deg); } }

/* ===================== הודעות ===================== */
.ttc-alert {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-family: 'Heebo', Arial, sans-serif;
  direction: rtl;
}
.ttc-alert-success { background: #dcfce7; color: #15803d; }
.ttc-alert-error { background: #fee2e2; color: #b91c1c; }
.ttc-alert-info { background: #e0edff; color: #2563eb; }
.ttc-alert-warning { background: #fef9c3; color: #a16207; }

/* רספונסיביות לוח הבקרה */
@media (max-width: 700px) {
  .ttc-dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}
