:root {
  --bg-deep: #060911;
  --card-surface: rgba(17, 25, 42, 0.84);
  --card-border: rgba(255, 255, 255, 0.09);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.32);
  --danger: #f43f5e;
  --warning: #f59e0b;
}

body[data-theme="emerald"] { --accent: #10b981; --accent-glow: rgba(16, 185, 129, 0.32); }
body[data-theme="violet"]  { --accent: #8b5cf6; --accent-glow: rgba(139, 92, 246, 0.32); }
body[data-theme="ocean"]   { --accent: #0ea5e9; --accent-glow: rgba(14, 165, 233, 0.32); }
body[data-theme="sunset"]  { --accent: #f59e0b; --accent-glow: rgba(245, 158, 11, 0.32); }
body[data-theme="crimson"] { --accent: #f43f5e; --accent-glow: rgba(244, 63, 94, 0.32); }
body[data-theme="gold"]    { --accent: #eab308; --accent-glow: rgba(234, 179, 8, 0.38); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 5%, var(--accent-glow), transparent 42%),
    radial-gradient(circle at 85% 95%, rgba(14, 165, 233, 0.07), transparent 42%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 92px;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ================= شاشة OLED السوداء النقية (#000000) ================= */
.oled-screen {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 5000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.oled-screen.active {
  display: flex;
}

.oled-real-clock {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.oled-timer-digits {
  font-size: 86px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 28px var(--accent-glow);
}

.oled-phase-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.oled-exit-btn {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  padding: 10px 22px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.app-container {
  max-width: 450px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* الهيدر */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.user-profile { display: flex; align-items: center; gap: 9px; }

.avatar-ring {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.user-meta { display: flex; flex-direction: column; gap: 3px; }
.name-row { display: flex; align-items: center; gap: 5px; }
.name-row h2 { font-size: 14px; font-weight: 800; }

.rank-tag {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--accent);
  font-weight: 700;
}

.xp-bar-wrap {
  width: 96px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  width: 10%;
  background: var(--accent);
  transition: width 0.35s ease;
}

.header-badges { display: flex; align-items: center; gap: 5px; }

.sync-pill, .streak-pill, .coin-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.sync-dot.syncing { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.eq-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  padding: 0 4px;
}
.eq-bars.playing { display: flex; }
.eq-bars span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eqBounce 0.8s infinite ease-in-out alternate;
}
.eq-bars span:nth-child(2) { animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eqBounce {
  0% { height: 4px; }
  100% { height: 14px; }
}

.view {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}
.view.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 16px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.6);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-head h3 { font-size: 15px; font-weight: 800; }
.sub-hint { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.accent-label { font-size: 13px; font-weight: 800; color: var(--accent); }

/* المؤقت والقوالب الذكية */
.mode-pills {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 10px;
}

.mode-pill {
  flex: 1;
  padding: 7px 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  border-radius: 10px;
  cursor: pointer;
}
.mode-pill.active { background: var(--accent); color: #fff; }

.presets-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.preset-chip, .quick-task-tpl {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s;
}
.preset-chip.active-preset, .preset-chip:active, .quick-task-tpl:active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: #fff;
}

/* شريط خطة التقسيم الذكي (Smart Split Queue) */
.smart-split-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  padding: 7px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 11px;
  flex-wrap: wrap;
}
.split-step {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 700;
}
.split-step.current {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}
.split-step.done-step {
  opacity: 0.45;
  text-decoration: line-through;
}

.active-task-banner {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}

/* حلقة المؤقت التفاعلية القابلة للسحب */
.timer-ring-box {
  position: relative;
  width: 244px;
  height: 244px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); cursor: grab; }
.ring-svg:active { cursor: grabbing; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 12; }
.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 703.7;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.ring-thumb {
  fill: #ffffff;
  stroke: var(--accent);
  stroke-width: 4;
  filter: drop-shadow(0 0 6px var(--accent));
  cursor: grab;
}

.timer-inner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.real-clock-mini {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-weight: 700;
}

.strict-indicator {
  font-size: 10px;
  color: var(--danger);
  background: rgba(244, 63, 94, 0.15);
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
  font-weight: 700;
}

.timer-digits {
  font-size: 50px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  line-height: 1;
}

.timer-subtext { font-size: 11px; color: var(--text-secondary); margin-top: 6px; text-align: center; }

.cycle-dots { display: flex; gap: 5px; margin-top: 8px; }
.c-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.c-dot.filled { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* شريط السحب لتحريك الوقت */
.time-scrubber-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.time-scrubber {
  flex: 1;
  accent-color: var(--accent);
  height: 6px;
  cursor: pointer;
}
.scrub-lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  min-width: 28px;
  text-align: center;
}

.fine-time-controls {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.fine-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.distraction-btn { color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }
.distraction-btn.cooldown { opacity: 0.35; pointer-events: none; }

.timer-actions { display: flex; gap: 8px; align-items: center; }

.main-play-btn {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 15px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px -4px var(--accent-glow);
}

.icon-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 16px;
  cursor: pointer;
}

.timer-sub-actions {
  display: flex;
  justify-content: space-around;
  margin-top: 12px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.oled-trigger-btn { color: var(--accent); }
.danger-text { color: var(--danger); }

/* الصوتيات الحقيقية */
.sound-channels-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sound-channel {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--card-border);
  padding: 9px 10px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: 0.2s;
}

.sound-channel.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.ch-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
}

.ch-vol {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
}

/* ================= واجهات اختيار المهام الحديثة (بديلة الـ select) ================= */
.picker-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.picker-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
}

.modern-pills-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.m-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.m-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.prio-pill-q1.active { background: var(--danger); border-color: var(--danger); box-shadow: 0 4px 12px rgba(244,63,94,0.35); }
.prio-pill-q2.active { background: var(--warning); border-color: var(--warning); box-shadow: 0 4px 12px rgba(245,158,11,0.35); }
.prio-pill-q3.active { background: #fb923c; border-color: #fb923c; }
.prio-pill-q4.active { background: #0ea5e9; border-color: #0ea5e9; }

.creator-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.stepper-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  padding: 5px 10px;
  border-radius: 12px;
}

.stepper-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

.step-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.step-btn:active { background: var(--accent); }
.step-val { font-size: 14px; font-weight: 900; min-width: 18px; text-align: center; }

.sort-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.s-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.s-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.view-switch {
  display: flex;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 2px;
}
.v-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.v-btn.active { background: var(--accent); color: #fff; }

.linear-progress {
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.linear-progress.large { height: 11px; }
.linear-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.3s ease; }

.pomo-Prediction-bar {
  font-size: 11px;
  color: var(--accent);
  background: rgba(255,255,255,0.03);
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 700;
}

.task-creator { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.input-modern, .search-input, .scratchpad-area {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  width: 100%;
}
.sub-input { font-size: 12px; padding: 8px 12px; }

.btn-create-task {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.tasks-toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.filter-tabs { display: flex; gap: 5px; }
.f-tab {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.f-tab.active { background: var(--accent); color: #fff; }

.pro-tasks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 350px;
  overflow-y: auto;
}

.pro-task-item {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--card-border);
  border-right: 4px solid var(--accent);
  padding: 11px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pro-task-item.prio-q1 { border-right-color: var(--danger); }
.pro-task-item.prio-q2 { border-right-color: var(--warning); }
.pro-task-item.prio-q3 { border-right-color: #fb923c; }
.pro-task-item.prio-q4 { border-right-color: #0ea5e9; }
.pro-task-item.done { opacity: 0.52; }
.pro-task-item.done .t-title { text-decoration: line-through; }

.t-top-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.t-main { display: flex; flex-direction: column; gap: 3px; flex: 1; cursor: pointer; }
.t-title { font-size: 14px; font-weight: 700; }
.t-meta { display: flex; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.t-actions { display: flex; gap: 5px; }
.pin-btn, .del-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.subtasks-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 10px;
  border-right: 1px dashed rgba(255,255,255,0.15);
}
.subtask-row {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.subtask-row.sub-done { text-decoration: line-through; opacity: 0.6; }

.eisenhower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.matrix-quad {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 10px;
  min-height: 120px;
}
.matrix-quad h4 { font-size: 11px; margin-bottom: 6px; }
.matrix-quad ul { list-style: none; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.matrix-quad li {
  background: rgba(255,255,255,0.04);
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.tasks-footer { display: flex; justify-content: flex-end; margin-top: 10px; }

/* العادات، الماء، والمفكرة */
.water-cups-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.water-cup {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 10px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.4;
  transition: 0.2s;
}
.water-cup.drank {
  opacity: 1;
  background: rgba(14, 165, 233, 0.35);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.energy-selector { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.energy-btn {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.energy-btn.active { border-color: var(--accent); color: #fff; background: var(--accent-glow); }

.habit-input-row { display: flex; gap: 6px; margin-bottom: 10px; }
.habits-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.habit-item {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.habit-item.done-today { border-color: var(--accent); background: rgba(16, 185, 129, 0.1); }

.scratchpad-area { min-height: 130px; resize: vertical; line-height: 1.6; }

/* التحليلات والمتجر */
.goal-footer-row { display: flex; justify-content: space-between; align-items: center; }
.purity-badge { font-size: 11px; color: var(--accent); font-weight: 700; }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kpi-val { font-size: 22px; font-weight: 900; color: var(--accent); }
.kpi-lbl { font-size: 11px; color: var(--text-secondary); }

.heatmap-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat-cell {
  height: 22px;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: rgba(255,255,255,0.4);
}
.heat-l1 { background: rgba(16, 185, 129, 0.25); }
.heat-l2 { background: rgba(16, 185, 129, 0.55); }
.heat-l3 { background: rgba(16, 185, 129, 0.9); color: #fff; font-weight: 700; }

.bar-chart {
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 4px; }
.bar-day { font-size: 10px; color: var(--text-secondary); }

.shop-items-grid { display: flex; flex-direction: column; gap: 8px; }
.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  border-radius: 14px;
}
.shop-info { display: flex; flex-direction: column; font-size: 12px; }
.shop-info span { font-size: 11px; color: var(--text-secondary); }
.buy-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.session-log-list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.session-log-item {
  font-size: 12px;
  background: rgba(0,0,0,0.28);
  padding: 8px 10px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
}

.badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 9px;
  border-radius: 14px;
  text-align: center;
  opacity: 0.32;
}
.badge-box.unlocked { opacity: 1; border-color: var(--accent); background: var(--accent-glow); }
.badge-box .b-icon { font-size: 20px; display: block; }
.badge-box .b-name { font-size: 11px; font-weight: 700; }

/* الإعدادات */
.theme-picker { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.theme-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.theme-dot.active { border-color: #fff; transform: scale(1.1); }

.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 8px; }
.num-input {
  width: 60px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 5px;
  border-radius: 8px;
  text-align: center;
}

.backup-actions { display: flex; gap: 8px; }
.sec-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 10px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.accent-border { border-color: var(--accent); color: var(--accent); }
.danger-border { border-color: var(--danger); color: var(--danger); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.close-modal-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.breath-circle-wrap { height: 180px; display: flex; align-items: center; justify-content: center; margin: 16px 0; }
.breath-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 4s ease-in-out;
}
.breath-circle.inhale { transform: scale(1.65); transition-duration: 4s; }
.breath-circle.hold   { transform: scale(1.65); transition-duration: 7s; }
.breath-circle.exhale { transform: scale(1); transition-duration: 8s; }
.breath-instruction { font-size: 13px; margin-bottom: 14px; color: var(--text-secondary); }

.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 426px;
  background: rgba(13, 20, 36, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.65);
}
.nav-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.nav-item.active { color: var(--accent); background: rgba(255, 255, 255, 0.05); }
.nav-icon { font-size: 17px; }

body.keyboard-open .bottom-nav { display: none !important; }

.toast-container {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
}
.toast {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}