:root {
  --bg: #0f1220;
  --card: #171b2e;
  --accent: #6c5ce7;
  --accent-hover: #8177f0;
  --text: #eef0f6;
  --muted: #9296ab;
  --busy: #3a2130;
  --busy-text: #d17a94;
  --free: #1f2440;
  --free-border: #343a5e;
  --danger: #e05260;
  --ok: #35c78a;
  --radius: 10px;
}

/* Belt-and-braces: some elements below set their own `display`, which (per
   normal CSS cascade rules) overrides the browser's default `[hidden]`
   handling since author rules always beat the user-agent stylesheet. This
   guarantees `el.hidden = true` actually hides the element no matter what
   other display rules apply to it — was previously broken for .install-btn,
   which stayed visible (and non-functional) even when it should hide. */
[hidden] {
  display: none !important;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 24px;
  text-align: center;
}

.step {
  margin-bottom: 22px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

input[type="date"],
input[type="text"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--free-border);
  background: var(--free);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 12px;
}

input.input-invalid {
  border-color: var(--danger);
}

.choice-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* The service row (PC/PS5/Racing) always has exactly 3 options — force it
   onto one line and let the buttons share the width evenly instead of
   wrapping to a second row, which was eating extra vertical space. */
#service-options {
  flex-wrap: nowrap;
}
#service-options button {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 4px;
  font-size: 0.85rem;
}

.install-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 0 0 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--ok);
  color: #06281c;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.install-btn:hover {
  filter: brightness(1.05);
}

.install-hint {
  background: var(--free);
  border: 1px solid var(--free-border);
  border-radius: var(--radius);
  padding: 12px;
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.choice-row button,
.choice-grid button {
  border: 1px solid var(--free-border);
  background: var(--free);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
}

.choice-row button.selected,
.choice-grid button.selected {
  background: var(--accent);
  border-color: var(--accent);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.choice-grid button:disabled {
  background: var(--busy);
  color: var(--busy-text);
  border-color: var(--busy);
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

button[type="submit"] {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

button[type="submit"]:disabled {
  background: var(--free-border);
  cursor: not-allowed;
}

button[type="submit"]:not(:disabled):hover {
  background: var(--accent-hover);
}

.success {
  text-align: center;
}

.success h2 {
  color: var(--ok);
}

.success button {
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--free-border);
  background: var(--free);
  color: var(--text);
  cursor: pointer;
}
