:root {
  --deep-blue: #0b1a3c;
  --white: #ffffff;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --purple: #9b59b6;
  --blue: #2e6ee6;
  --card-bg: #0f2450;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--deep-blue);
  color: var(--white);
  font-family: "Tahoma", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 3px solid var(--yellow);
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(11,26,60,0.95), rgba(11,26,60,0.85));
  z-index: 10;
}
.app-title { margin: 0; font-size: 20px; }
.app-container { padding: 16px; max-width: 1100px; margin: 0 auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card-bg);
  border: 2px solid var(--yellow);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35), inset 0 0 24px rgba(241,196,15,0.08);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card .meta { font-size: 13px; color: #cfe2ff; margin-bottom: 12px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  appearance: none;
  border: 2px solid var(--yellow);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.08s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: transparent; }
.btn-success { background: var(--green); }
.btn-secondary { background: #1f4fb8; }
.btn-danger { background: #c0392b; border-color: #ffd166; }
.btn-purple { background: var(--purple); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.question {
  background: var(--card-bg);
  border: 2px solid var(--yellow);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}
.question-title { margin: 0 0 8px; font-size: 18px; }
.choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d2a60;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover { border-color: var(--yellow); }
.choice-label {
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: 50%;
  border: 2px solid var(--yellow);
}
.choice.selected { border-color: var(--green); background: #10306d; }
.choice.correct { border-color: var(--green); }
.choice.wrong { border-color: var(--purple); }

.explanation {
  background: var(--card-bg);
  border: 2px solid var(--yellow);
  border-radius: 12px;
  padding: 12px;
}
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #06122c;
  background: var(--yellow);
}
.tag.correct { background: var(--green); }
.tag.wrong { background: var(--purple); color: #06122c; }

.app-footer {
  border-top: 3px solid var(--yellow);
  padding: 12px 16px;
  margin-top: 24px;
  color: #cfe2ff;
}

@media (min-width: 640px) {
  .choices { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .app-title { font-size: 24px; }
  .card h3, .question-title { font-size: 20px; }
}
