: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; }

/* ---------- HOME ---------- */
#lamp {
  position: absolute;
  top: 0; left: 0;
  width: 600px; height: 600px;
  display: block;
}

.hud {
  position: absolute;
  top: 16px; left: 20px;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.hud-name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}
.hud-meta {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.controls {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(to top, rgba(10,10,15,0.96) 70%, rgba(10,10,15,0));
}
.ctrl {
  flex: 1 1 120px;
  min-height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl.wide { flex-basis: 100%; }
.ctrl:active { transform: scale(0.97); }

/* ---------- MENU + shared bars ---------- */
.bar {
  flex: 0 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 24px;
  font-weight: 700;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--bg-tertiary);
}

.list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.group-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 4px 4px 0;
}
.pal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
.pal-opt {
  min-height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
}
.pal-opt.active {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 16px rgba(0,255,136,0.35);
}
.row {
  min-height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: 0 20px;
  text-align: left;
}
.row.back { color: var(--accent); }

/* ---------- ABOUT ---------- */
.about-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 18px;
  line-height: 1.5;
}
.about-body .lead {
  font-size: 30px;
  font-weight: 700;
}
.about-body .dim { color: var(--text-secondary); font-size: 16px; }
.about-body .back { margin-top: auto; }
