* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: linear-gradient(160deg, #1a1440 0%, #2d1b4e 55%, #12203f 100%);
  color: #f5f3ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header { text-align: center; padding: 2.2rem 1rem 1.2rem; }
.logo { font-size: 2.4rem; font-weight: 900; }
.tagline { color: #c9c3e8; margin-top: .4rem; font-size: 1.02rem; }
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 0 1rem 2rem; }
.games-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.game-card {
  display: block;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 1.3rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, background .12s ease;
}
.game-card:active { transform: scale(.98); }
.game-card h2 { font-size: 1.35rem; font-weight: 800; margin: .35rem 0 .2rem; }
.game-card p { color: #c9c3e8; font-size: .98rem; }
.game-icon { font-size: 2.6rem; }
.play-btn {
  display: inline-block; margin-top: .8rem;
  background: linear-gradient(90deg, #ffb347, #ff6b6b);
  color: #241239; font-weight: 800;
  padding: .55rem 1.4rem; border-radius: 999px; font-size: 1rem;
}
.game-card.soon { opacity: .55; }
.soon-tag {
  display: inline-block; margin-top: .8rem;
  background: rgba(255,255,255,.14); color: #e8e4ff;
  padding: .45rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
}
.site-footer { text-align: center; color: #9d96c4; font-size: .9rem; padding: 1.2rem 1rem 1.6rem; }
.load-err { text-align: center; color: #ffb3b3; padding: 2rem 0; }

/* ===== Shared game page chrome ===== */
.game-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.home-link { color: #c9c3e8; text-decoration: none; font-weight: 700; font-size: .95rem; }
.score-pill { background: rgba(255,255,255,.1); border-radius: 999px; padding: .3rem 1rem; font-weight: 800; }
.screen { display: none; flex-direction: column; flex: 1; }
.screen.active { display: flex; }
.center-box { text-align: center; margin: auto 0; padding: 1rem 0; }
.game-title { font-size: 2rem; font-weight: 900; margin-bottom: .4rem; }
.game-sub { color: #c9c3e8; margin-bottom: 1.6rem; }
.big-btn {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(90deg, #ffb347, #ff6b6b);
  color: #241239; font-family: inherit; font-weight: 900; font-size: 1.2rem;
  padding: .85rem 2.6rem; border-radius: 999px;
}
.big-btn:active { transform: scale(.97); }
.ghost-btn {
  display: inline-block; border: 1px solid rgba(255,255,255,.3); cursor: pointer;
  background: transparent; color: #e8e4ff; font-family: inherit; font-weight: 700; font-size: 1rem;
  padding: .7rem 1.6rem; border-radius: 999px; text-decoration: none; margin-top: .7rem;
}
.progress-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.progress-track { flex: 1; height: 8px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#ffb347,#ff6b6b); border-radius: 99px; transition: width .25s ease; }
.q-count { font-size: .9rem; color: #c9c3e8; white-space: nowrap; font-weight: 700; }
.timer-track { height: 6px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; margin-bottom: 1.1rem; }
.timer-fill { height: 100%; width: 100%; background: #4ade80; border-radius: 99px; }
.timer-fill.low { background: #f87171; }
.question-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 1.4rem 1.1rem; font-size: 1.25rem; font-weight: 800;
  text-align: center; margin-bottom: 1rem; line-height: 1.7;
}
.answers { display: grid; gap: .7rem; }
.answer-btn {
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06);
  color: #f5f3ff; font-family: inherit; font-size: 1.08rem; font-weight: 700;
  padding: .9rem 1rem; border-radius: 14px; cursor: pointer; text-align: right;
  transition: background .12s ease;
}
.answer-btn:active { background: rgba(255,255,255,.16); }
.answer-btn.correct { background: #16a34a; border-color: #16a34a; }
.answer-btn.wrong { background: #dc2626; border-color: #dc2626; }
.answer-btn:disabled { cursor: default; }
.result-emoji { font-size: 3.4rem; }
.result-verdict { font-size: 1.6rem; font-weight: 900; margin: .4rem 0; }
.result-score { font-size: 1.15rem; color: #c9c3e8; margin-bottom: .3rem; }
.result-best { color: #ffd166; font-weight: 700; margin-bottom: 1.4rem; }

.play-btn{text-decoration:none}.apk-btn{display:block;color:#ffe0a3;font-weight:700;margin-top:.8rem;text-decoration:none}.install-note{max-width:580px;margin:.7rem auto 0;line-height:1.9;font-size:.8rem}
