: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;
  --warn: #ffaa33;
  --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; }
.hidden { display: none !important; }
.focusable {
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 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);
}

/* ---------- HOME ---------- */
.app-header { padding: 36px 32px 8px; }
.app-title {
  font-size: 44px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.app-sub { font-size: 19px; color: var(--text-secondary); margin-top: 6px; }
.home-stat {
  margin: 10px 32px 18px;
  font-size: 16px; color: var(--text-muted);
  border-left: 3px solid var(--accent); padding-left: 12px;
}
.menu { display: flex; flex-direction: column; gap: 16px; padding: 0 32px; flex: 1; }
.menu-btn {
  display: flex; align-items: center; gap: 18px;
  min-height: 88px; padding: 0 24px;
  background: var(--bg-secondary); border-radius: var(--radius-md);
  color: var(--text-primary); text-align: left; width: 100%;
}
.menu-btn.primary {
  background: linear-gradient(100deg, #0c2d36, #0a2438);
}
.menu-ico { font-size: 32px; line-height: 1; width: 40px; text-align: center; }
.menu-label { font-size: 24px; font-weight: 600; }
.hint {
  padding: 14px 32px 24px; font-size: 14px; color: var(--text-muted);
  text-align: center;
}

/* ---------- SHARED HEADER ---------- */
.screen-header {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--bg-tertiary);
}
.icon-btn {
  width: 56px; height: 56px; flex: 0 0 56px;
  background: var(--bg-secondary); border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 34px; line-height: 50px;
  text-align: center; font-weight: 700;
}
.screen-title { font-size: 26px; font-weight: 700; }

/* ---------- RESULT ---------- */
.result-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.ex-card {
  background: var(--bg-secondary); border-radius: var(--radius-md);
  padding: 24px; border: 1px solid var(--bg-tertiary);
}
.ex-name {
  font-size: 38px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.5px; min-height: 42px;
}
.ex-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.badge {
  font-size: 16px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  background: var(--bg-tertiary); color: var(--text-secondary);
}
.badge-muscle { background: rgba(0, 212, 255, 0.15); color: var(--accent); }
.badge.diff-Beginner { background: rgba(0, 255, 136, 0.15); color: var(--accent-secondary); }
.badge.diff-Intermediate { background: rgba(255, 170, 51, 0.18); color: var(--warn); }
.badge.diff-Advanced { background: rgba(255, 68, 102, 0.18); color: var(--danger); }
.ex-target {
  font-size: 22px; font-weight: 700; color: var(--accent-secondary);
  margin-bottom: 18px;
}
.ex-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.ex-steps li {
  position: relative; padding-left: 44px;
  font-size: 18px; line-height: 1.4; color: var(--text-secondary);
  counter-increment: step;
}
.ex-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-tertiary); color: var(--accent);
  font-size: 15px; font-weight: 700; text-align: center; line-height: 30px;
}
.result-actions {
  display: flex; gap: 12px; padding: 16px 24px 24px;
  border-top: 1px solid var(--bg-tertiary);
}
.action-btn {
  flex: 1; min-height: 64px; border-radius: var(--radius-md);
  background: var(--bg-secondary); color: var(--text-primary);
  font-size: 18px; font-weight: 700;
}
.action-btn.primary { background: linear-gradient(100deg, #0c2d36, #0a2438); color: var(--accent); }
.action-btn.is-fav { color: var(--warn); }

/* ---------- SCROLL LISTS ---------- */
.scroll-list { flex: 1; overflow-y: auto; padding: 18px 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 72px; padding: 14px 20px;
  background: var(--bg-secondary); border-radius: var(--radius-md);
  color: var(--text-primary); width: 100%; text-align: left;
}
.li-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.li-name { font-size: 21px; font-weight: 700; }
.li-sub { font-size: 15px; color: var(--text-muted); }
.li-tag {
  font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 212, 255, 0.15); color: var(--accent); white-space: nowrap;
}
.li-tag.diff-Beginner { background: rgba(0, 255, 136, 0.15); color: var(--accent-secondary); }
.li-tag.diff-Intermediate { background: rgba(255, 170, 51, 0.18); color: var(--warn); }
.li-tag.diff-Advanced { background: rgba(255, 68, 102, 0.18); color: var(--danger); }
.list-item .li-count { font-size: 15px; color: var(--text-muted); }

.empty-state { text-align: center; color: var(--text-secondary); padding: 30px 10px; }
.empty-state p { font-size: 20px; margin-bottom: 22px; }

/* scrollbar */
.result-body::-webkit-scrollbar, .scroll-list::-webkit-scrollbar { width: 6px; }
.result-body::-webkit-scrollbar-thumb, .scroll-list::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary); border-radius: 3px;
}

@keyframes pop { 0% { opacity: 0; transform: scale(0.97); } 100% { opacity: 1; transform: scale(1); } }
.reveal { animation: pop 0.18s ease; }
