:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* ---------- shared ---------- */
.btn {
  width: 100%;
  min-height: 88px;
  border-radius: var(--radius-md);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #04141a;
}
.btn-ghost {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.menu {
  display: flex; flex-direction: column; gap: 16px;
  padding: 0 48px;
  width: 100%;
}
.menu-bottom { margin-top: auto; padding-bottom: 36px; }

.stats-row {
  display: flex; justify-content: center; gap: 56px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: 15px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- home ---------- */
.home-inner {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  gap: 40px;
}
.brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brand-mark {
  width: 84px; height: 84px; border-radius: 24px;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-secondary));
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.35);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 26px;
  border: 4px solid #04141a; border-radius: 50%;
  border-right-color: transparent; border-bottom-color: transparent;
  transform: rotate(45deg);
}
.brand-title { font-size: 42px; font-weight: 700; letter-spacing: 0.5px; }
.brand-tag { font-size: 19px; color: var(--text-secondary); }

/* ---------- top bar (info) ---------- */
.bar {
  padding: 30px 40px 18px;
  border-bottom: 1px solid var(--bg-tertiary);
}
.bar-title { font-size: 30px; font-weight: 700; }
.info-body {
  flex: 1;
  padding: 30px 44px;
  display: flex; flex-direction: column; gap: 22px;
}
.info-line {
  font-size: 21px; line-height: 1.4; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 14px;
}
.info-line b { color: var(--text-primary); }
.dot {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); margin-top: 9px;
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- session ---------- */
.session-top { padding: 26px 44px 0; }
.progress-track {
  width: 100%; height: 10px; border-radius: 6px;
  background: var(--bg-tertiary); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 6px;
  transition: width 0.2s linear;
}
.session-count {
  margin-top: 12px; font-size: 17px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1.5px; text-align: center;
}

.session-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 26px;
  padding: 8px 36px;
}
.figure-wrap { width: 150px; height: 165px; flex: none; }
.figure { width: 100%; height: 100%; }
.hl {
  fill: rgba(0, 212, 255, 0.18);
  stroke: var(--accent);
  stroke-width: 3;
  transition: cx 0.3s ease, cy 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.ring-wrap { position: relative; width: 180px; height: 180px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--bg-tertiary); stroke-width: 12; }
.ring-prog {
  fill: none; stroke: var(--accent); stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 414.7;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.5));
}
.ring-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 700; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.session-name {
  text-align: center; font-size: 32px; font-weight: 700;
  padding: 0 28px;
}
.session-cue {
  text-align: center; font-size: 19px; color: var(--text-secondary);
  padding: 8px 40px 0; line-height: 1.35; min-height: 52px;
}

.controls {
  display: flex; gap: 14px;
  padding: 14px 36px 30px;
}
.ctrl {
  flex: 1; min-height: 80px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-danger { color: var(--danger); }

.session.paused .ring-prog { stroke: var(--text-muted); filter: none; }
.session.paused .hl { animation: none; opacity: 0.4; }

/* ---------- complete ---------- */
.complete-inner {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 0 48px;
}
.check {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--bg-secondary);
  border: 4px solid var(--accent-secondary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}
.check svg { width: 64px; height: 64px; }
.check path {
  fill: none; stroke: var(--accent-secondary); stroke-width: 8;
  stroke-linecap: round; stroke-linejoin: round;
}
.complete-title { font-size: 40px; font-weight: 700; }
.complete-sub { font-size: 20px; color: var(--text-secondary); text-align: center; }
.complete-inner .menu { margin-top: 8px; }
