:root { --panel: #fff8ea; --ink: #3b2a1a; --accent: #e8942a; --accent-dark: #c9741a; --shadow: 0 4px 14px rgba(0,0,0,0.18); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink);
  background: linear-gradient(180deg, #8ec7e8 0%, #a9d67f 60%, #7fb85a 100%); background-attachment: fixed; }
main { max-width: 720px; margin: 0 auto; padding: 48px 20px 40px; }
header { text-align: center; margin-bottom: 28px; }
h1 { font-size: 44px; margin: 0 0 8px; letter-spacing: 0.02em; text-shadow: 0 2px 0 rgba(255,255,255,0.5); }
header p { margin: 0; font-size: 17px; opacity: 0.85; }
.games { display: grid; gap: 16px; }
.game { display: flex; align-items: center; gap: 18px; background: var(--panel); border-radius: 18px; padding: 18px 22px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform 0.12s ease-out; }
.game:hover { transform: translateY(-2px); background: #fff; }
.game .icon { font-size: 44px; line-height: 1; }
.game .text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.game strong { font-size: 22px; }
.game .text span { font-size: 14px; opacity: 0.8; }
.game .go { background: var(--accent); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.game:hover .go { background: var(--accent-dark); }
footer { text-align: center; margin-top: 40px; font-size: 13px; opacity: 0.6; }

/* top corner: language switch, log in, account menu */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 0;
  max-width: 1000px; margin: 0 auto; }
.topbar .account { margin-left: auto; position: relative; display: flex; align-items: center; gap: 10px; }
.back { color: var(--ink); text-decoration: none; font-weight: 600; opacity: 0.85; }
.back:hover { opacity: 1; text-decoration: underline; }
.button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 16px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); background: var(--panel);
  box-shadow: var(--shadow); }
.button:hover { background: #fff; }
.button.primary, button.primary { background: var(--accent); color: #fff; }
.button.primary:hover, button.primary:hover:not(:disabled) { background: var(--accent-dark); }
.account-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.account-toggle .email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 240px; background: var(--panel);
  border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: grid; gap: 12px; }
.account .menu[hidden] { display: none; }
.account .menu .who { margin: 0; overflow-wrap: anywhere; }
.account .menu .who small { opacity: 0.7; }
.account .menu .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account .menu .button { justify-content: center; box-shadow: none; border: 2px solid rgba(59,42,26,0.15); }
.lang-switch { display: inline-flex; background: rgba(255,248,234,0.75); border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  padding: 5px 10px; border-radius: 999px; cursor: pointer; opacity: 0.7; }
.lang-switch button.active { background: #fff; opacity: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }

/* /login */
main.narrow { max-width: 420px; padding-top: 32px; }
.card { background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); padding: 26px 24px; }
.auth { display: grid; gap: 14px; }
.auth h1 { font-size: 30px; margin: 0; text-shadow: none; }
.auth .muted { margin: -6px 0 4px; }
.muted { opacity: 0.7; font-size: 14px; }
.auth label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.auth input { font: inherit; font-weight: 400; padding: 11px 13px; border-radius: 10px; border: 2px solid rgba(59,42,26,0.2);
  background: #fff; color: var(--ink); width: 100%; }
.auth input:focus { outline: none; border-color: var(--accent); }
.auth .hint { font-weight: 400; }
.auth .hint[hidden] { display: none; }
.auth button.primary { border: 0; border-radius: 999px; padding: 12px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.auth button.primary:disabled { opacity: 0.6; cursor: default; }
.error { margin: 0; background: #fde4dc; color: #8a2a12; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.error[hidden] { display: none; }
.switch { margin: 0; text-align: center; font-size: 14px; }
button.link { border: 0; background: none; font: inherit; color: var(--accent-dark); font-weight: 700; cursor: pointer; padding: 0 4px; text-decoration: underline; }

@media (max-width: 480px) {
  main { padding-top: 24px; }
  h1 { font-size: 36px; }
  .account-toggle .email { max-width: 120px; }
}
.auth label[hidden], .switch[hidden] { display: none; }
.account .menu a.button { text-decoration: none; }

/* the "All games" icon (public/all-games.svg): every link to this front page uses it */
.all-games-icon { width: 22px; height: 22px; vertical-align: middle; }
.all-games-icon.big { width: 40px; height: 40px; margin-right: 12px; vertical-align: -4px; }
.back { display: inline-flex; align-items: center; gap: 8px; }
