/*
  ── Design tokens ─────────────────────────────────────────────────────────
  All colours are defined here so every screen stays consistent.

  Key rule for additive waveguide displays:
    #000000  →  fully transparent (real world shows through)
    #0a0a0f+ →  dark UI surfaces (cards, headers) — must not be pure black
*/
:root {
  --bg-primary:   #000000; /* page background — transparent on glasses */
  --bg-secondary: #0a0a0f; /* headers, nav bars                         */
  --bg-tertiary:  #14141f; /* buttons, list items                       */
  --bg-card:      #1a1a2e; /* cards, focused states                     */

  --text-primary:   #ffffff;
  --text-secondary: #a0a0b0;

  --accent-primary: #00d4ff; /* cyan — focus ring, highlights             */
  --focus-ring:     #00d4ff;
  --focus-glow:     rgba(0, 212, 255, 0.4);

  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ── Reset ────────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  /* Fixed 600×600 — the glasses display is exactly this size */
  width: 600px;
  height: 600px;
  overflow: hidden;
}

/* ── App root ─────────────────────────────────────────────────────────── */
#app { width: 100%; height: 100%; position: relative; }

/* ── Screens ──────────────────────────────────────────────────────────── */
/*
  Every screen fills the full 600×600 canvas.
  Screens stack via position:absolute; only the visible one lacks .hidden.
*/
.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0; left: 0;
}
.screen.hidden { display: none; }

/* ── Header ───────────────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-secondary);
  gap: 12px;
  flex-shrink: 0; /* never squish the header */
}
.header h1    { font-size: 22px; font-weight: 600; flex: 1; }
.header-meta  { font-size: 20px; }

/* ── Scrollable content area ──────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Focus states (critical for D-pad / EMG navigation) ──────────────── */
/*
  Every interactive element must have class="focusable".
  The glasses have NO cursor — focus is the only selection indicator.
  The cyan glow below must be clearly visible at arm's length.
*/
.focusable {
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.focusable:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 20px var(--focus-glow);
}

/* ── App grid (launcher tiles) ────────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 120px;
}
.app-tile:focus { background: var(--bg-card); }

.tile-icon { font-size: 40px; line-height: 1; }
.tile-name { font-size: 15px; font-weight: 600; }

/* ── Utility ──────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
