
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #03050a;
  --card-bg: #121726;
  --accent-red: #ff5252;
  --accent-green: #4caf50;
  --accent-yellow: #ffeb3b;
  --accent-blue: #29b6f6;
  --text-main: #f5f5f5;
  --text-muted: #b0bec5;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2735 0, #090a0f 60%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

main#game {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

h1, h2 {
  text-align: center;
  margin-top: 0;
}

p {
  line-height: 1.4;
}

#mode-screen h1 {
  margin-bottom: 10px;
}

#mode-screen p {
  max-width: 560px;
  margin: 0 auto 14px;
  text-align: center;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin: 16px 0 8px;
}

.mode-buttons .btn {
  width: 100%;
  max-width: 260px;
}

.hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

#question-card {
  background: rgba(10, 11, 18, 0.95);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#question-title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

#question-text {
  margin-top: 0;
  margin-bottom: 14px;
}

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

#mode-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-blue);
}

#progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.2rem;
}

#answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-btn {
  width: 100%;
  text-align: left;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(33, 33, 48, 0.95);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.answer-btn:hover {
  transform: translateY(-1px);
}

.answer-btn.correct {
  background: rgba(76, 175, 80, 0.25);
  border-color: var(--accent-green);
}

.answer-btn.incorrect {
  background: rgba(244, 67, 54, 0.25);
  border-color: var(--accent-red);
}

.answer-btn.disabled {
  pointer-events: none;
  opacity: 0.85;
}

.feedback {
  min-height: 1.2em;
  text-align: center;
  margin: 10px 0 2px;
  font-size: 0.95rem;
}

.feedback.correct {
  color: var(--accent-green);
}

.feedback.incorrect {
  color: var(--accent-yellow);
}

.actions {
  text-align: center;
  margin-top: 10px;
}

.actions.center {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  margin: 4px;
}

.btn.primary {
  background: linear-gradient(135deg, #ff7043, #ff5252);
  color: #fff;
}

.btn.secondary {
  background: rgba(33, 150, 243, 0.95);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: default;
}

#ending-screen p {
  max-width: 560px;
  margin: 10px auto 20px;
  text-align: center;
}

#credits {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-bottom: 10px;
}

@media (min-width: 640px) {
  main#game {
    padding-top: 40px;
  }
  #question-card {
    padding: 22px 24px 18px;
  }
  .mode-buttons {
    flex-direction: row;
    justify-content: center;
  }
}
