/* ═══════════════════════════════════════════════════════
   EyeFocus — styles.css
   שפה עיצובית קיימת: רקע בהיר, Heebo, כחול #3a6fd8.
═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;600;700;900&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f2f4f8;
  --white: #ffffff;
  --border: #d0d5e2;
  --circle-bg: #d8dce8;
  --circle-rim: #b0b8cc;
  --text: #1a1f2e;
  --muted: #7a8299;
  --gold: #e8b800;
  --gold-dark: #c09600;
  --green: #2eac5a;
  --yellow-m: #d4a000;
  --orange-m: #e07020;
  --red-m: #d63030;
  --accent: #3a6fd8;
  --accent-dark: #2a55b0;
  --accent-soft: rgba(58,111,216,0.08);
}

html, body {
  height: 100%; width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Heebo', sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.t-dark { color: var(--text); }
.t-accent { color: var(--accent); }

/* ══ SCREENS ══ */
.screen { display: none; position: absolute; inset: 0; flex-direction: column; }
.screen.active { display: flex; }

/* ══ AUTH ══ */
#auth {
  background: var(--bg);
  align-items: center; justify-content: center;
  overflow-y: auto; padding: 28px 24px 40px;
}
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-logo-img, .intro-logo-img {
  width: 170px; height: 170px; border-radius: 18px; display: block;
  object-fit: contain; background: #fff;
  box-shadow: 0 4px 20px rgba(58,111,216,0.12); flex-shrink: 0;
}
.intro-logo-img { width: 130px; height: 130px; }
.auth-top h1 { font-size: 24px; font-weight: 900; color: var(--text); text-align: center; line-height: 1.2; }
.auth-top h1 em { font-style: normal; color: var(--accent); }
.auth-top p { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; max-width: 260px; }

.name-input-row { width: 100%; max-width: 340px; display: flex; gap: 8px; margin-bottom: 20px; }
.auth-input {
  flex: 1; padding: 13px 16px; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 14px; color: var(--text);
  font-family: 'Heebo', sans-serif; font-size: 15px; font-weight: 600; outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-user-select: auto; user-select: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.auth-input::placeholder { color: var(--muted); font-weight: 400; }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,111,216,0.1); }
.auth-input.err { border-color: var(--red-m); box-shadow: 0 0 0 3px rgba(214,48,48,0.1); }

.auth-btn {
  padding: 13px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: 14px;
  font-family: 'Heebo', sans-serif; font-size: 14px; font-weight: 900;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(58,111,216,0.28);
  transition: transform .12s, background .15s; flex-shrink: 0;
}
.auth-btn:active { transform: scale(0.96); }
.auth-btn:hover { background: var(--accent-dark); }

.err-msg {
  font-size: 12px; color: var(--red-m);
  margin-top: -14px; margin-bottom: 8px; padding-right: 4px;
  display: none; width: 100%; max-width: 340px;
}
.err-msg.show { display: block; }

.section-label {
  width: 100%; max-width: 340px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--muted); text-transform: uppercase;
  margin-bottom: 10px; padding-right: 2px;
}

.users-list { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 14px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.user-row:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(58,111,216,0.12); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); border: 1.5px solid rgba(58,111,216,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--accent); flex-shrink: 0;
}
.user-info { flex: 1; }
.user-name { font-size: 14px; font-weight: 700; color: var(--text); }
.user-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.user-arrow { font-size: 18px; color: var(--border); }

.empty-state {
  width: 100%; max-width: 340px; text-align: center; padding: 28px 16px;
  background: var(--white); border: 1.5px dashed var(--border); border-radius: 14px;
  color: var(--muted); font-size: 13px; line-height: 1.6;
}
.empty-state .es-icon { font-size: 26px; margin-bottom: 8px; display: block; }

.auth-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--red-m); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 700; z-index: 999; opacity: 0;
  transition: opacity .25s; white-space: nowrap; pointer-events: none;
}
.auth-toast.show { opacity: 1; }
.auth-toast.success { background: var(--green); }

/* ══ USER TOPBAR ══ */
.user-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--white);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ut-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff; flex-shrink: 0;
}
.ut-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); }
.ut-logout {
  font-size: 12px; color: var(--muted); background: none; border: none;
  font-family: 'Heebo', sans-serif; cursor: pointer; padding: 4px 8px;
  border-radius: 8px; transition: background .15s;
}
.ut-logout:hover { background: var(--bg); }

/* ══ INTRO ══ */
#intro { background: var(--bg); }
.intro-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; padding: 20px 28px 36px; overflow-y: auto;
}
.intro-explain { text-align: center; font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 300px; }
.intro-warning { font-size: 12px; color: var(--muted); text-align: center; max-width: 280px; }

.glasses-note {
  width: 100%; max-width: 340px; background: #fffbea;
  border: 1.5px solid #e8d800; border-radius: 14px; padding: 11px 14px;
  display: flex; align-items: center; gap: 10px;
}
.gn-icon { font-size: 20px; }
.gn-text { font-size: 13px; color: #7a6800; line-height: 1.4; }
.gn-text strong { color: #5a4a00; }

.preview-circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--circle-bg); border: 5px solid var(--circle-rim);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 4px; }
.preview-e { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; }

.info-cards { display: flex; gap: 10px; width: 100%; max-width: 340px; }
.info-card {
  flex: 1; background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 8px; text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.info-card .ic-icon { font-size: 18px; margin-bottom: 4px; }
.info-card .ic-txt { font-size: 11px; color: var(--muted); line-height: 1.4; }

.start-btn {
  width: 100%; max-width: 340px; padding: 17px;
  background: var(--accent); color: #fff; border: none; border-radius: 18px;
  font-size: 16px; font-weight: 900; font-family: 'Heebo', sans-serif;
  cursor: pointer; box-shadow: 0 6px 24px rgba(58,111,216,0.28);
  transition: transform .12s; flex-shrink: 0;
}
.start-btn:active { transform: scale(0.97); }
.start-btn:disabled { background: var(--border); box-shadow: none; cursor: default; }

.history-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px; width: 100%; max-width: 340px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04); cursor: pointer;
}
.hb-icon { font-size: 18px; }
.hb-text { flex: 1; }
.hb-title { font-size: 12px; font-weight: 700; color: var(--text); }
.hb-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.hb-arrow { font-size: 18px; color: var(--accent); margin-right: auto; }

/* ══ TEST ══ */
#test { background: var(--bg); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 12px; background: var(--white);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.tb-group { text-align: center; }
.tb-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.tb-val { font-size: 20px; font-weight: 900; color: var(--text); margin-top: 1px; }
.tb-val.blue { color: var(--accent); }

.step-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 20px 4px; flex-shrink: 0; flex-wrap: wrap; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .3s, transform .2s; }
.step-dot.done { background: var(--green); }
.step-dot.active { background: var(--accent); transform: scale(1.3); }

.size-label { text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 0.5px; padding: 2px 20px 6px; flex-shrink: 0; }

.arena { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }

.vision-circle {
  position: relative; border-radius: 50%;
  background: var(--circle-bg); border: 7px solid var(--circle-rim);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.13), 0 8px 32px rgba(0,0,0,0.1);
  transition: border-color .15s;
}
.vision-circle.flash-ring {
  border-color: var(--accent);
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.13), 0 0 0 4px rgba(58,111,216,0.18), 0 8px 32px rgba(0,0,0,0.1);
}
.e-grid { display: grid; opacity: 0; transition: opacity .04s; }
.e-cell { display: flex; align-items: center; justify-content: center; }
.circle-feedback {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 7px solid transparent; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.circle-feedback.correct { border-color: var(--green); opacity: 1; }
.circle-feedback.wrong { border-color: var(--red-m); opacity: 1; }

.dir-btn {
  position: absolute; width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--gold-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(200,160,0,0.3);
  transition: transform .1s, background .1s;
  -webkit-tap-highlight-color: transparent; padding: 0;
}
.dir-btn:active { transform: scale(0.87) !important; }
.dir-btn.hit-correct { background: var(--green); border-color: #1e8040; }
.dir-btn.hit-wrong { background: var(--red-m); border-color: #a82020; }
.btn-e { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; }

.instruction {
  flex-shrink: 0; text-align: center; font-size: 14px; color: var(--muted);
  padding: 10px 20px 24px; line-height: 1.5;
  background: var(--white); border-top: 1px solid var(--border);
}
.instruction strong { color: var(--text); }

/* ══ COUNTDOWN ══ */
.countdown-overlay {
  position: absolute; inset: 0; z-index: 20; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.cd-instruction { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 32px; text-align: center; }
.cd-instruction-icon { font-size: 48px; }
.cd-instruction-title { font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.25; }
.cd-instruction-body { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 280px; }
.cd-start-btn {
  padding: 16px 48px; background: var(--accent); color: #fff;
  border: none; border-radius: 18px;
  font-family: 'Heebo', sans-serif; font-size: 18px; font-weight: 900;
  cursor: pointer; box-shadow: 0 6px 24px rgba(58,111,216,0.32);
  transition: transform .12s; animation: popIn .4s ease;
}
.cd-start-btn:active { transform: scale(0.95); }
.countdown-num { font-size: 96px; font-weight: 900; color: var(--accent); line-height: 1; animation: popIn .35s ease; }
@keyframes popIn { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.countdown-hint { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.5; }
.countdown-go {
  font-size: 72px; font-weight: 900; color: var(--green);
  animation: popIn .3s ease; cursor: pointer; padding: 12px 32px;
  border-radius: 20px; background: rgba(46,172,90,0.10);
  border: 2.5px solid rgba(46,172,90,0.3); user-select: none;
}
.countdown-go-hint { font-size: 13px; color: var(--green); opacity: .7; animation: fadeIn .5s ease .3s both; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: .7 } }

.fixation-cross {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 18px; font-weight: 300; color: #8a90a8; opacity: 0;
  transition: opacity .1s; pointer-events: none; z-index: 5;
  line-height: 1; user-select: none; letter-spacing: -2px;
}

/* ══ RESULTS ══ */
#results { align-items: stretch; padding: 0; background: var(--bg); overflow-y: auto; }

.res-dash-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 16px 20px 14px; display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.rdh-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.rdh-title { font-size: 18px; font-weight: 900; color: var(--text); }
.rdh-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rdh-badge { margin-right: auto; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 900; flex-shrink: 0; }

.gauge-card {
  background: var(--white); margin: 12px 14px 0;
  border-radius: 18px; border: 1px solid var(--border);
  padding: 16px 16px 14px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.gauge-card-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.gauge-wrap { position: relative; width: 200px; height: 108px; }
#gaugeCanvas { position: absolute; top: 0; left: 0; }
.gauge-center { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.gauge-pct { font-size: 30px; font-weight: 900; color: var(--text); line-height: 1; }
.gauge-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.gauge-verdict { font-size: 13px; color: var(--muted); text-align: center; }

.thresh-card {
  margin: 12px 14px 0; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 16px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.thresh-left { display: flex; align-items: center; gap: 10px; }
.thresh-icon { font-size: 22px; }
.thresh-title { font-size: 13px; font-weight: 700; color: var(--text); }
.thresh-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.thresh-val { font-size: 24px; font-weight: 900; color: var(--accent); }

.game-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 14px 0; }
.game-kpi {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-align: center;
}
.gk-stars { font-size: 16px; letter-spacing: 2px; min-height: 22px; }
.gk-label { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.gk-val { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1; }

.train-card {
  margin: 10px 14px 0; background: var(--white);
  border: 1.5px solid #b8e6c8; border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(46,172,90,0.08);
}
.train-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.train-icon { font-size: 20px; }
.train-title { font-size: 14px; font-weight: 900; color: var(--text); }
.train-teaser-text { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.train-cta-btn {
  width: 100%; padding: 13px; background: var(--green); color: #fff;
  border: none; border-radius: 14px;
  font-family: 'Heebo', sans-serif; font-size: 14px; font-weight: 900;
  cursor: pointer; box-shadow: 0 4px 16px rgba(46,172,90,0.25);
  transition: transform .12s;
}
.train-cta-btn:active { transform: scale(0.97); }

/* ══ AI CARD ══ */
.ai-card {
  margin: 10px 14px 0; background: var(--white);
  border: 1.5px solid var(--accent); border-radius: 18px; padding: 16px;
  box-shadow: 0 2px 12px rgba(58,111,216,0.10);
}
.ai-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-card-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.ai-card-title { font-size: 13px; font-weight: 900; color: var(--text); }
.ai-card-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.ai-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; }
.ai-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading-txt { font-size: 12px; color: var(--muted); }

.diag-rows { display: flex; flex-direction: column; gap: 10px; }
.diag-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 11px; }
.diag-row-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.diag-row-body { flex: 1; }
.diag-row-label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--muted); text-transform: uppercase; }
.diag-row-val { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; line-height: 1.4; }
.diag-row-val.green { color: var(--green); }
.diag-row-val.orange { color: var(--orange-m); }
.diag-row-val.red { color: var(--red-m); }

.rel-bar-bg { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.rel-bar-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 1.2s ease; width: 0; }

.ai-error { font-size: 13px; color: var(--red-m); text-align: center; padding: 12px 0; line-height: 1.5; }
.ai-retry-btn {
  display: block; margin: 8px auto 0; background: none;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 7px 16px;
  font-family: 'Heebo', sans-serif; font-size: 12px; color: var(--muted); cursor: pointer;
}
.ai-retry-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ══ BREAKDOWN ══ */
.breakdown-details {
  margin: 10px 14px 0; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden;
}
.breakdown-details summary {
  padding: 12px 14px; font-size: 13px; font-weight: 700; color: var(--muted);
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
}
.breakdown-details summary::before { content: '▶'; font-size: 10px; transition: transform .2s; }
.breakdown-details[open] summary::before { transform: rotate(90deg); }
.breakdown-rows { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; }
.brow {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 14px;
  display: flex; align-items: center; gap: 10px;
}
.brow-label { font-size: 13px; font-weight: 700; flex: 1; }
.brow-score { font-size: 13px; font-weight: 900; flex-shrink: 0; min-width: 40px; text-align: left; }
.brow-bar-bg { flex: 1.8; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.brow-bar-fill { height: 100%; border-radius: 3px; width: 0; transition: width 1.1s ease; }

.dash-btns { padding: 14px 14px 32px; display: flex; flex-direction: column; gap: 10px; }
.replay-btn {
  width: 100%; padding: 15px; background: var(--accent); color: #fff;
  border: none; border-radius: 16px;
  font-size: 15px; font-weight: 900; font-family: 'Heebo', sans-serif;
  cursor: pointer; box-shadow: 0 5px 20px rgba(58,111,216,0.22);
  transition: transform .12s;
}
.replay-btn:active { transform: scale(0.97); }
.home-link { font-size: 14px; color: var(--muted); text-align: center; background: none; border: none; font-family: 'Heebo', sans-serif; cursor: pointer; }

/* ══ TRAINING SCREEN — מודול נפרד ══ */
#training { background: var(--bg); }
.training-scroll {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px 40px;
}
#trainingContent { width: 100%; max-width: 380px; }

.lock-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); text-align: center;
}
.lock-icon { font-size: 44px; }
.lock-title { font-size: 20px; font-weight: 900; color: var(--text); }
.lock-body { font-size: 14px; color: var(--muted); line-height: 1.65; }
.lock-price {
  font-size: 15px; font-weight: 900; color: var(--green);
  background: rgba(46,172,90,0.08); border: 1.5px solid rgba(46,172,90,0.25);
  border-radius: 12px; padding: 8px 18px;
}
.lock-code-note {
  font-size: 12px; color: var(--muted); line-height: 1.6;
  background: var(--bg); border-radius: 12px; padding: 10px 14px; width: 100%;
}
.lock-code-note strong { color: var(--text); font-size: 13px; }
.restore-section {
  width: 100%; border-top: 1px dashed var(--border);
  padding-top: 14px; margin-top: 4px;
}
.restore-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-align: right; }

/* ══ נגישות ══ */
button:focus-visible, input:focus-visible, .user-row:focus-visible {
  outline: 3px solid rgba(58,111,216,0.45); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ══ CONSENT — הסכמה לתנאי שימוש ══ */
#consent { background: var(--bg); }
.consent-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.consent-title { font-size: 18px; font-weight: 900; color: var(--text); text-align: center; }
.consent-sub { font-size: 13px; color: var(--muted); text-align: center; }
.consent-scroll {
  max-height: 44vh; overflow-y: auto; font-size: 13px; line-height: 1.65;
  color: var(--text); background: var(--bg); border-radius: 12px; padding: 14px;
  border: 1px solid var(--border);
}
.consent-scroll p { margin-bottom: 10px; }
.consent-scroll a { color: var(--accent); font-weight: 700; }
.consent-danger {
  background: rgba(214,48,48,0.06); border: 1.5px solid rgba(214,48,48,0.25);
  border-radius: 10px; padding: 10px 12px; color: #8a1f1f;
}
.consent-check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: var(--text); line-height: 1.55; cursor: pointer;
}
.consent-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }

/* ══ TRAINING — רמות, יומן, השוואה ══ */
.level-chip {
  padding: 7px 18px; border-radius: 20px; font-size: 14px; font-weight: 900;
}
.level-chip.lvl-0 { background: rgba(46,172,90,0.1); color: var(--green); border: 1.5px solid rgba(46,172,90,0.3); }
.level-chip.lvl-1 { background: rgba(212,160,0,0.1); color: var(--yellow-m); border: 1.5px solid rgba(212,160,0,0.3); }
.level-chip.lvl-2 { background: rgba(214,48,48,0.08); color: var(--red-m); border: 1.5px solid rgba(214,48,48,0.28); }

.games-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.gp-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700;
  background: var(--bg); border-radius: 10px; padding: 9px 11px; color: var(--text);
}

.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; width: 100%; }
.day-cell {
  aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; background: var(--bg); color: var(--muted);
  border: 1.5px solid var(--border);
}
.day-cell.done { background: rgba(46,172,90,0.12); color: var(--green); border-color: rgba(46,172,90,0.35); }
.day-cell.next { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); animation: nextPulse 1.6s infinite; }
@keyframes nextPulse { 50% { box-shadow: 0 0 0 4px rgba(58,111,216,0.12); } }

.done-today {
  width: 100%; background: rgba(46,172,90,0.08); border: 1.5px solid rgba(46,172,90,0.3);
  border-radius: 14px; padding: 14px; font-size: 14px; font-weight: 900; color: var(--green);
  line-height: 1.6;
}
.done-today span { font-size: 12px; font-weight: 400; color: var(--muted); }

.cmp-headline { font-size: 15px; font-weight: 900; color: var(--green); text-align: center; }
.cmp-wrap { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.cmp-row { width: 100%; }
.cmp-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-align: right; }
.cmp-bars { display: flex; flex-direction: column; gap: 5px; }
.cmp-bar {
  height: 26px; border-radius: 8px; display: flex; align-items: center;
  padding: 0 10px; min-width: 90px; transition: width 1s ease;
}
.cmp-bar span { font-size: 11px; font-weight: 900; white-space: nowrap; }
.cmp-bar.old { background: var(--border); color: var(--muted); }
.cmp-bar.new { background: var(--accent-soft); color: var(--accent); border: 1.5px solid rgba(58,111,216,0.3); }
.cmp-bar.new.improved { background: rgba(46,172,90,0.12); color: var(--green); border-color: rgba(46,172,90,0.35); }

.sum-rows { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.sum-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-radius: 12px; padding: 10px 12px;
}
.sum-icon { font-size: 16px; }
.sum-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); text-align: right; }
.sum-acc { font-size: 15px; font-weight: 900; }
.sum-detail { font-size: 11px; color: var(--muted); direction: ltr; }

/* ══ TRAINING SESSION — מצב כהה (פלטת המשחקים) ══ */
#training.dark-session { background: #070F18; }
#training.dark-session .user-topbar { display: none; }
.tg-session { width: 100%; display: flex; flex-direction: column; gap: 12px; }
#training.dark-session .training-scroll { padding-top: 14px; }

.tg-progress {
  text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: #415A77; text-transform: uppercase;
}
.tg-intro {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(224,225,221,0.1);
  border-radius: 18px; padding: 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.tg-intro-icon { font-size: 42px; }
.tg-intro-title { font-size: 20px; font-weight: 900; color: #E0E1DD; }
.tg-intro-goal { font-size: 12px; color: #F5B041; font-weight: 700; }
.tg-intro-instr { font-size: 14px; color: #A0A5B5; line-height: 1.7; }
.tg-rest-count { font-size: 56px; font-weight: 900; color: #F5B041; line-height: 1; }

.tg-hud { display: flex; align-items: center; justify-content: space-between; }
.tg-hud-name { font-size: 13px; font-weight: 900; color: #E0E1DD; }
.tg-hud-score { font-size: 14px; font-weight: 900; color: #A0A5B5; direction: ltr; }
.tg-hud-score .ok { color: #2eac5a; }
.tg-hud-score .err { color: #d63030; }

.tg-timerbar { height: 5px; background: rgba(224,225,221,0.1); border-radius: 3px; overflow: hidden; }
.tg-timerfill { height: 100%; width: 100%; background: #F5B041; border-radius: 3px; }

.tg-canvas-wrap { width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid rgba(224,225,221,0.08); }
.tg-canvas-wrap canvas { display: block; touch-action: manipulation; }

.tg-btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.tg-btn {
  flex: 1; max-width: 150px; padding: 15px 10px;
  background: rgba(224,225,221,0.06); color: #E0E1DD;
  border: 1.5px solid rgba(224,225,221,0.2); border-radius: 14px;
  font-family: 'Heebo', sans-serif; font-size: 15px; font-weight: 900;
  cursor: pointer; transition: transform .1s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.tg-btn:active { transform: scale(0.94); }
.tg-btn.tg-shape { font-size: 24px; }
.tg-btn.hit { background: rgba(46,172,90,0.25); border-color: #2eac5a; }
.tg-btn.miss { background: rgba(214,48,48,0.25); border-color: #d63030; }

#training.dark-session .lock-card {
  background: rgba(255,255,255,0.02); border-color: rgba(224,225,221,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
#training.dark-session .lock-title { color: #E0E1DD; }
#training.dark-session .lock-body, #training.dark-session .home-link { color: #A0A5B5; }
#training.dark-session .sum-row { background: rgba(224,225,221,0.05); }
#training.dark-session .sum-name { color: #E0E1DD; }

/* כפתור האליפסה — משחק המנהרה */
.tg-ellipse-btn {
  max-width: 220px; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 13px 10px 11px;
  border-color: rgba(245,176,65,0.55);
}
.tg-ellipse-btn span { font-size: 13px; color: #F5B041; }
.tg-ellipse-btn svg { display: block; }

/* כפתורי גאבור — 4 כיוונים */
.tg-gabor-btn { max-width: 76px; padding: 10px 8px; display: flex; align-items: center; justify-content: center; }
.tg-gabor-btn canvas { border-radius: 50%; }

/* ══ טיימליין מקטעים בתוך משחק (מצב כהה) ══ */
.tg-segbar { display: flex; gap: 5px; width: 100%; direction: ltr; }
.tg-seg {
  flex: 1; height: 7px; background: rgba(224,225,221,0.10);
  border-radius: 4px; overflow: hidden;
}
.tg-seg-fill { height: 100%; width: 0%; background: #F5B041; border-radius: 4px; transition: width .2s linear; }
.tg-seg.done .tg-seg-fill { background: #2eac5a; }
.tg-seg.pulse { animation: segPulse .7s ease; }
@keyframes segPulse {
  0% { box-shadow: 0 0 0 0 rgba(46,172,90,0.7); }
  100% { box-shadow: 0 0 0 9px rgba(46,172,90,0); }
}
.tg-seg-flash {
  align-self: center; font-size: 12px; font-weight: 900; color: #2eac5a;
  background: rgba(46,172,90,0.12); border: 1px solid rgba(46,172,90,0.35);
  border-radius: 20px; padding: 4px 14px; opacity: 0; transform: translateY(-4px);
  transition: opacity .3s, transform .3s; pointer-events: none; min-height: 18px;
}
.tg-seg-flash.show { opacity: 1; transform: translateY(0); }

/* ══ ספירה לאחור בין משחקים (מצב כהה) ══ */
.tg-count-wrap {
  min-height: 46vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.tg-count {
  font-size: 96px; font-weight: 900; color: #F5B041; line-height: 1;
  animation: popIn .35s ease;
}
.tg-count.go { color: #2eac5a; animation: popIn .3s ease; }
.tg-count-hint { font-size: 13px; color: #A0A5B5; }

/* ══ מסך סיום יומי — גיימינג בהיר ══ */
.sum-card { gap: 10px; }
.sum-day {
  font-size: 11px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted);
  text-transform: uppercase;
}
.sum-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; }
.stars { display: inline-flex; gap: 4px; direction: ltr; }
.star { color: #d8dce8; transition: color .3s; }
.star.on { color: #f0b400; text-shadow: 0 2px 10px rgba(240,180,0,0.35); }
.stars.lg .star { font-size: 42px; }
.stars.lg .star.on { animation: starPop .5s ease backwards; }
.stars.lg .star.on:nth-child(2) { animation-delay: .15s; }
.stars.lg .star.on:nth-child(3) { animation-delay: .3s; }
@keyframes starPop { from { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.25); } to { transform: scale(1); } }
.stars.sm .star { font-size: 13px; }
.sum-avg { font-size: 40px; font-weight: 900; color: var(--text); line-height: 1.1; }
.sum-avg-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.sum-praise { font-size: 15px; font-weight: 900; color: var(--accent); }
.sum-invite {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  background: var(--accent-soft); border: 1px solid rgba(58,111,216,0.18);
  border-radius: 12px; padding: 10px 14px; width: 100%;
}
.reminder-link { color: var(--accent); font-weight: 700; }

/* ══ צפייה בתוצאות יום שהושלם ══ */
.day-cell.done { cursor: pointer; transition: transform .12s, box-shadow .15s; }
.day-cell.done:hover { transform: scale(1.06); box-shadow: 0 2px 10px rgba(46,172,90,0.25); }
.day-detail {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  animation: fadeIn .25s ease;
}
.dd-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.dd-head strong { color: var(--accent); }
.dd-close {
  margin-right: auto; background: none; border: none; font-size: 14px;
  color: var(--muted); cursor: pointer; font-family: 'Heebo';
}

/* ══ משחק טקסט רץ (RSVP) — מצב כהה ══ */
.tg-rsvp {
  min-height: 46vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  border-radius: 16px; border: 1px solid rgba(224,225,221,0.08);
  background: #070F18; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: box-shadow .15s;
}
.tg-rsvp.hit { box-shadow: inset 0 0 0 3px rgba(46,172,90,0.6); }
.tg-rsvp.missf { box-shadow: inset 0 0 0 3px rgba(214,48,48,0.5); }
.tg-rsvp-word {
  font-size: 34px; font-weight: 700; color: #E0E1DD; line-height: 1.2;
  min-height: 44px; text-align: center; padding: 0 14px; transition: color .08s;
}
.tg-rsvp-word.target { color: #F5B041; text-shadow: 0 0 18px rgba(245,176,65,0.45); }
.tg-rsvp-hint { font-size: 12px; color: #A0A5B5; transition: opacity .6s; }

/* ══ הנחיה קצרה בתחתית מסך המשחק (מצב כהה) ══ */
.tg-tagline {
  text-align: center; font-size: 19px; font-weight: 900; color: #F5B041;
  letter-spacing: 0.3px; padding: 10px 8px 4px; line-height: 1.3;
}

/* ══ זכויות יוצרים — כל המסכים ══ */
.app-footer {
  position: fixed; bottom: 4px; left: 0; right: 0; z-index: 40;
  text-align: center; font-size: 10px; color: #8b93a7; opacity: .75;
  pointer-events: none; font-family: 'Heebo', sans-serif;
}
