/* Pasatiempos — Shared Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #F5C842;
  --yellow-light: #FEF3C7;
  --green: #A8D5A2;
  --green-dark: #6DBF67;
  --blue: #D6EAF8;
  --blue-dark: #3498DB;
  --dark: #2C2C2C;
  --gray: #888;
  --gray-light: #F0F0F0;
  --white: #FFFFFF;
  --red: #E74C3C;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--dark);
  background: #F8F8F6;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--yellow);
  color: var(--dark);
}
.btn-primary:hover { background: #e8b800; transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary {
  background: var(--gray-light);
  color: var(--dark);
}
.btn-secondary:hover { background: #e0e0e0; }

/* ── Unified Topbar (shared by all game pages) ── */
.topbar { background: #fff; border-bottom: 3px solid #F5C842; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 50; }
.topbar-left { flex: 0 0 auto; min-width: 80px; }
.topbar-left a { font-size: .85rem; color: #888; text-decoration: none; }
.topbar-left a:hover { color: #1a1a2e; }
.topbar-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; }
.topbar-spacer { min-width: 80px; }
.topbar-title { font-size: 1.15rem; font-weight: 800; color: #1a1a2e; text-align: center; }
.topbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.help-btn { background: #1565C0; color: #fff; border: none; border-radius: 20px; padding: 6px 14px; font-size: .8rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.help-btn:hover { background: #1976D2; }
.mode-toggle { display: flex; background: #F4F4F4; border-radius: 20px; padding: 3px; gap: 2px; }
.mode-btn { padding: 5px 12px; border-radius: 16px; font-size: .75rem; font-weight: 600; cursor: pointer; border: none; background: transparent; color: #888; transition: all .15s; font-family: inherit; }
.mode-btn.active { background: #fff; color: #1a1a2e; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ── Language Selector (i18n-bi) ── */
.lang-selector { display: flex; background: #F4F4F4; border-radius: 20px; padding: 3px; gap: 2px; }
.lang-btn { padding: 5px 12px; border-radius: 16px; font-size: .75rem; font-weight: 700; cursor: pointer; border: none; background: transparent; color: #888; transition: all .15s; font-family: inherit; letter-spacing: .5px; }
.lang-btn.active { background: #fff; color: #1a1a2e; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lang-btn:hover:not(.active) { color: #1a1a2e; }
