/* Shared look for the home and game pages: dark palette, gold primary, Inter. */
:root {
  --radius: 10px;
  --background: #0f1218;
  --foreground: #e8eaf0;
  --card: #171b24;
  --popover: #1a1f2b;
  --primary: #d9b15a;
  --primary-foreground: #17130a;
  --secondary: #222836;
  --muted-foreground: #9aa1b2;
  --accent: #262d3d;
  --warning: #fbbf24;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 30%, #18202d 0%, var(--background) 65%) fixed;
  color: var(--foreground);
  font: 15px/1.45 Inter, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: var(--foreground);
  background: transparent;
  transition: background .15s, border-color .15s, filter .15s;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-outline { border-color: var(--input); background: rgba(255, 255, 255, .03); }
.btn-outline:hover:not(:disabled) { background: var(--accent); }
.btn-ghost:hover:not(:disabled) { background: var(--accent); }

.field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  outline: none;
}
.input::placeholder { color: rgba(154, 161, 178, .5); }
.input:focus { border-color: var(--primary); }
.error { color: var(--warning); font-size: 14px; margin: 0; }

/* Dialogs: a dimmed overlay with a centred card. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .7);
  animation: fade .15s ease-out;
}
.dialog {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: pop .18s ease-out;
}
.dialog.small { max-width: 380px; }
.dialog h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.dialog .description { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.dialog .body { display: grid; gap: 20px; margin-top: 20px; }
.dialog .footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

@media (max-width: 480px) {
  .dialog .footer { flex-direction: column-reverse; }
  .dialog .footer .btn { width: 100%; }
}
