:root {
  --bg: #0b1220;
  --card: #111a2f;
  --text: #e5e7eb;
  --ok: #22c55e;
  --bad: #ef4444;
  --accent: #38bdf8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}
h1, h2 { margin: 0 0 12px; }
.hidden { display: none !important; }

.topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.topic-chip {
  background: var(--card);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--accent);
  color: #001018;
  font-weight: 700;
}
button:disabled { opacity: 0.6; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

#quiz {
  padding-bottom: 84px; /* místo pro plovoucí reset tlačítko */
}

#quiz:not(.hidden) #resetBtn {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.reset-btn {
  padding: 8px 10px;
  background: #334155;
  color: var(--text);
}
.card {
  background: var(--card);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 14px;
}
#questionImage {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  margin: 10px 0;
}
.answers {
  display: grid;
  gap: 8px;
}
.answer-btn {
  text-align: left;
  background: #1f2a44;
  color: var(--text);
  border: 1px solid #334155;
}
.feedback {
  min-height: 24px;
  margin: 10px 2px;
  font-weight: 700;
}
.ok { color: var(--ok); }
.bad { color: var(--bad); }

@media (max-width: 480px) {
  .app { padding: 12px; }
}