/* Playsla — brand colors and minimal layout. The Tesla browser is Chromium;
   modern CSS is fine. Keep it small — file is loaded over a phone Wi-Fi link. */

:root {
  --bg:      #0b0d10;
  --bg-2:    #14181f;
  --line:    #1f242d;
  --text:    #eef2f6;
  --muted:   #8a93a0;
  --brand:   #fdb515;   /* amber play triangle */
  --brand-2: #1f6feb;   /* blue accent */
  --ok:      #2fa84f;
  --warn:    #d8a23a;
  --err:     #d84f4f;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  height: 100%; width: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

#stage { position: fixed; inset: 0; }

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 44px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0));
  z-index: 10;
  font-size: 13px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.logo .play { color: var(--brand); font-size: 16px; line-height: 1; }
.logo .brand { letter-spacing: 0.5px; }
.status { color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

.splash {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.splash-inner { max-width: 460px; width: 100%; text-align: center; }
.logo-big { display: inline-flex; align-items: baseline; gap: 12px; font-size: 38px; font-weight: 700; }
.logo-big .play { color: var(--brand); font-size: 36px; }
.tag { color: var(--muted); margin: 6px 0 32px; font-size: 16px; }

.steps { list-style: none; padding: 0; margin: 0 auto 22px; max-width: 360px; text-align: left; }
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px;
}
.step .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #3a414c; flex-shrink: 0;
  box-shadow: 0 0 0 0 transparent;
  transition: background 180ms, box-shadow 180ms;
}
.step.active .dot { background: var(--warn); animation: pulse 1.1s infinite; box-shadow: 0 0 0 4px rgba(216,162,58,0.18); }
.step.ok     .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(47,168,79,0.18); }
.step.err    .dot { background: var(--err); }
.step .label { flex: 1; }
.step .meta { color: var(--muted); font-size: 12px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

.hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 0 auto; max-width: 360px; }

.diag { margin-top: 22px; font-size: 12px; color: var(--muted); }
.diag summary { cursor: pointer; user-select: none; }
.diag .kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin-top: 10px; text-align: left; }
.diag .kv .k { color: var(--muted); }
.diag .kv .v { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.screen {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: #000;
  display: block;
  touch-action: none;
}
.hidden { display: none !important; }

.touch-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5;
}
.touch-overlay .ripple {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(253,181,21,0.6);
  box-shadow: 0 0 0 6px rgba(253,181,21,0.2);
  transform: translate(-50%, -50%);
  animation: ripple 600ms ease-out forwards;
  pointer-events: none;
}
@keyframes ripple {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(2.4); }
}
