:root {
  --bg: #120c12;
  --panel: #1d1420;
  --panel-2: #271b2b;
  --text: #eee3ea;
  --muted: #a8949f;
  --accent: #c2213a;
  --gold: #f2c14e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #24152a, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.45 system-ui, "Segoe UI", sans-serif;
}
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
h1 { margin: 0; font-family: Georgia, serif; letter-spacing: 1px; }
button, input {
  font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid #4b3550; border-radius: 8px; padding: 10px 14px;
}
button { cursor: pointer; }
button:hover { border-color: var(--gold); }
button.primary { background: var(--accent); border-color: var(--accent); font-weight: 600; }

/* Game tiles: big square image buttons */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 8px 20px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel) center / cover no-repeat;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.tile:hover, a.tile:focus-visible { transform: translateY(-3px); border-color: var(--gold); outline: none; }
.tile .label {
  width: 100%;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-family: Georgia, serif;
  font-size: 24px;
}
.tile .label small { display: block; font-family: system-ui, sans-serif; font-size: 13px; color: var(--muted); }
.tile.soon { border: 2px dashed #4b3550; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.tile.soon .label { background: none; color: var(--text); }
.tile.soon .label small.badge {
  display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px;
  background: var(--gold); color: #1d1420; font-weight: 600; letter-spacing: 0.5px;
}

/* Login */
.login {
  max-width: 340px;
  margin: 12vh auto 0;
  padding: 28px;
  background: var(--panel);
  border-radius: 16px;
  display: grid;
  gap: 14px;
}
.login h1 { text-align: center; }
.login .error { color: #ff7d91; margin: 0; text-align: center; }

/* Language switch (EN | ES) */
.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; border: 1px solid #4b3550; border-radius: 8px; overflow: hidden; }
.lang-switch button { border: 0; border-radius: 0; padding: 8px 12px; background: var(--panel-2); color: var(--muted); font-weight: 600; letter-spacing: 0.5px; }
.lang-switch button + button { border-left: 1px solid #4b3550; }
.lang-switch button.on { background: var(--gold); color: #1d1420; }
.login .lang-switch { justify-self: center; }
