:root {
  --bg-primary: #000000; /* black = transparent on the additive display */
  --bg-secondary: #0a0a0f;
  --bg-tertiary: #14141f;
  --bg-card: #1a1a2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #707080;
  --accent-primary: #00d4ff;
  --accent-secondary: #00ff88;
  --magic: #c79bff;       /* Disney-ish violet accent */
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --ok: #00ff88;
  --warn: #ffaa00;
  --bad: #ff4466;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Buttons don't inherit color by default (UA sets black) -> would be black-on-black
   on the dark/additive display. Force inherit so all button text is light. */
button { color: inherit; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 600px; height: 600px; overflow: hidden;
}
#app { width: 100%; height: 100%; position: relative; }

.screen { width: 100%; height: 100%; display: flex; flex-direction: column; position: absolute; top: 0; left: 0; }
.screen.hidden { display: none; }
.hidden { display: none !important; }

/* Header */
.header { display: flex; align-items: center; padding: 14px 20px; background: var(--bg-secondary); gap: 12px; flex-shrink: 0; }
.header h1 { font-size: 23px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-meta { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.back-btn { background: transparent; color: var(--text-primary); font-size: 22px; padding: 8px 12px; border-radius: var(--radius-sm); border: 2px solid transparent; }

/* Content */
.content { flex: 1; padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.list-content { gap: 10px; padding: 12px 16px; }
.loading { color: var(--text-muted); font-size: 16px; padding: 20px 4px; text-align: center; }

/* Focus */
.focusable { transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; border: 2px solid transparent; cursor: pointer; min-height: 44px; }
.focusable:focus { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }

/* Nav bar */
.nav-bar { display: flex; gap: 8px; padding: 12px 20px; background: var(--bg-secondary); flex-shrink: 0; }
.nav-item { flex: 1; padding: 14px 10px; background: var(--bg-tertiary); border-radius: var(--radius-md); color: var(--text-primary); font-size: 15px; font-weight: 500; text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.nav-item:focus { background: var(--bg-card); }

/* ===== Parks (home) ===== */
.park-btn { display: flex; align-items: center; gap: 16px; width: 100%; padding: 22px; background: var(--bg-card); border-radius: var(--radius-lg); color: var(--text-primary); text-align: left; }
.park-logo-wrap { width: 134px; height: 74px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; padding: 8px; flex-shrink: 0; }
/* Both park logos are light (Disneyland recoloured to white via the build step,
   Adventure World already light), so they sit straight on the dark card — no
   chip needed, which reads better on the additive display. */
.park-logo { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.park-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.park-name { font-size: 21px; font-weight: 700; }
.park-sub { font-size: 14px; color: var(--text-secondary); }
.park-go { font-size: 32px; color: var(--magic); flex-shrink: 0; }

/* ===== Attraction list ===== */
.att-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; background: var(--bg-tertiary); border-radius: var(--radius-md); text-align: left; min-height: 76px; color: var(--text-primary); }
.att-thumb { width: 72px; height: 60px; border-radius: var(--radius-sm); background: var(--bg-card) center/cover no-repeat; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--magic); overflow: hidden; }
.att-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.att-name { font-size: 17px; font-weight: 600; line-height: 1.2; color: var(--text-primary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.att-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: var(--bg-card); color: var(--text-secondary); }
.tag.sr { color: var(--accent-primary); background: rgba(0,212,255,.16); }
.tag.pa { color: var(--magic); background: rgba(199,155,255,.16); }

/* wait badge */
.att-wait { flex-shrink: 0; min-width: 70px; text-align: center; }
.aw-num { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.aw-min { font-size: 12px; color: var(--text-secondary); }
.aw-state { font-size: 13px; font-weight: 700; }
.w-ok .aw-num { color: var(--ok); }
.w-warn .aw-num { color: var(--warn); }
.w-bad .aw-num { color: var(--bad); }
.w-closed .aw-state { color: var(--text-muted); }
.w-down .aw-state { color: var(--warn); }

/* ===== Detail ===== */
.detail-content { align-items: center; gap: 16px; }
.detail-photo { width: 100%; height: 220px; border-radius: var(--radius-lg); background: var(--bg-card) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 72px; color: var(--magic); overflow: hidden; }
.detail-wait { display: flex; align-items: baseline; gap: 8px; }
.dw-value { font-size: 84px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dw-unit { font-size: 26px; color: var(--text-secondary); }
.detail-rows { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.d-row { display: flex; justify-content: space-between; gap: 12px; background: var(--bg-card); border-radius: var(--radius-md); padding: 12px 16px; font-size: 16px; }
.d-row .k { color: var(--text-secondary); }
.d-row .v { font-weight: 700; }

/* Toast */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-120px); background: var(--bg-card); color: var(--text-primary); padding: 12px 24px; border-radius: 24px; font-size: 15px; border: 1px solid var(--accent-primary); transition: transform .3s ease; z-index: 100; pointer-events: none; max-width: 80%; text-align: center; }
.toast.visible { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); }
