:root {
  --left: #38b6ff;
  --right: #ff7a2f;
  --gold: #ffd23f;
  --bg: #07090f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  overflow: hidden;
}

#wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  display: block;
  cursor: crosshair;
}

#cam {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#start {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, rgba(7, 9, 15, 0.55), rgba(7, 9, 15, 0.9));
  overflow: auto;
}

#start[hidden], #help[hidden] { display: none; }

.card {
  max-width: 680px;
  width: 100%;
  background: rgba(14, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

h1 {
  margin: 0 0 4px;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(40px, 8vw, 72px);
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(255, 200, 40, 0.5);
  display: flex;
  align-items: center;
  gap: 16px;
}

h1 .ball {
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), transparent 35%),
    conic-gradient(#ffd23f 0 120deg, #1e6fd9 0 240deg, #fbf7ea 0);
  border: 2px solid rgba(40, 40, 60, 0.6);
  flex: none;
}

.lead { font-size: 20px; margin: 0 0 12px; }

ol { padding-left: 22px; line-height: 1.5; margin: 0 0 20px; }
li { margin-bottom: 6px; }
b.left { color: var(--left); }
b.right { color: var(--right); }

.buttons { display: flex; gap: 12px; flex-wrap: wrap; }

button {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 12px 22px;
  cursor: pointer;
}

button.primary {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
  font-size: 20px;
  padding: 14px 30px;
}

button:disabled { opacity: 0.5; cursor: wait; }
button:hover:not(:disabled) { filter: brightness(1.1); }

#status { min-height: 1.4em; color: var(--gold); margin: 16px 0 0; }
#error {
  color: #ffb4b4;
  background: rgba(200, 30, 45, 0.2);
  border: 1px solid rgba(255, 90, 90, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
}
.tip { font-size: 14px; opacity: 0.7; margin-bottom: 0; }

#help {
  position: fixed;
  left: 12px;
  top: 10px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  opacity: 0.55;
  pointer-events: none;
}

kbd {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 0 5px;
  font-family: inherit;
}
