:root {
  --bg: #07061a;
  --cyan: #38f3ff;
  --pink: #ff2d95;
  --gold: #ffd23f;
  --text: #e6ecff;
  --muted: #8d9bc4;
  --glass: rgba(10, 12, 38, 0.74);
  --edge: rgba(120, 140, 255, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow: hidden;
}

#stage { position: fixed; inset: 0; }
#stage canvas { display: block; width: 100%; height: 100%; }

#menu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 30%, rgba(7, 6, 26, 0.15), rgba(7, 6, 26, 0.7));
}
#menu.hidden, .hidden { display: none !important; }

.panel {
  width: min(720px, 100%);
  margin: auto;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--edge);
  border-radius: 28px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 60px rgba(255, 45, 149, 0.15), 0 0 120px rgba(56, 243, 255, 0.08);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 22px rgba(56, 243, 255, 0.7);
}
h1 span {
  color: var(--pink);
  text-shadow: 0 0 26px rgba(255, 45, 149, 0.85);
}

.lede { margin: 14px 0 22px; color: #c3cff0; font-size: 1.05rem; line-height: 1.5; }

.buttons { display: grid; gap: 12px; }

.btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 68px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn-title { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.04em; }
.btn-sub { font-size: 0.86rem; opacity: 0.8; }
.btn:hover:not(:disabled), .btn:focus-visible { transform: translateY(-2px); filter: brightness(1.12); outline: none; }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #0b6e8a, #1239a8); border-color: var(--cyan); box-shadow: 0 0 26px rgba(56, 243, 255, 0.35); }
.btn.accent { background: linear-gradient(135deg, #a3125f, #5a1596); border-color: var(--pink); box-shadow: 0 0 26px rgba(255, 45, 149, 0.35); }
.btn.ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--edge); }

#status { min-height: 1.4em; margin: 18px 0 8px; font-size: 0.95rem; color: var(--muted); }
#status.ok { color: #7dffb2; }
#status.warn { color: #ffb86b; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 12px; border-radius: 999px; font-size: 0.82rem; border: 1px solid var(--edge); }
.chip.on { color: #7dffb2; border-color: rgba(125, 255, 178, 0.45); }
.chip.off { color: #7c86a8; }

.options { margin-top: 18px; border-top: 1px solid var(--edge); padding-top: 12px; }
.options summary { cursor: pointer; color: var(--cyan); font-weight: 700; letter-spacing: 0.06em; padding: 6px 0; }
.options .grid { display: grid; gap: 12px; margin-top: 10px; }
.options label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.options label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
.options select {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.07); color: var(--text); font: inherit;
}
.options select option { color: #111; }
.options input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--pink); }

.features { margin: 20px 0 0; padding-left: 1.1em; color: #aebbe0; font-size: 0.92rem; line-height: 1.55; }
.features b { color: #fff; }

#flat-hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--text);
  font-size: 0.95rem;
  pointer-events: none;
}

@media (min-width: 720px) {
  .options .grid { grid-template-columns: 1fr 1fr; }
  .options label.check { grid-column: span 2; }
}
