/* ---------- BODY & CONTAINER ---------- */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #0f172a, #020617);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.container {
  width: 90%;
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ---------- HEADINGS ---------- */
h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  color: #38bdf8;
}

h2 {
  color: #22d3ee;
  margin-bottom: 15px;
}

/* ---------- CARDS ---------- */
.card {
  background: #1e293b;
  border: 2px solid #1e3a8a;
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px; /* Makes cards taller for bottom spacing */
  box-sizing: border-box;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px);}
  to { opacity: 1; transform: translateY(0);}
}

/* ---------- QUIZ STYLES ---------- */
.quiz-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
  justify-content: center; /* Center buttons horizontally */
}

.quiz-btn {
  flex: 1;
  max-width: 200px;
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 12px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.quiz-btn:hover {
  background: #60a5fa;
}

.quiz-result {
  margin-top: 12px;
  font-weight: bold;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

/* Correct / Incorrect feedback colors */
.quiz-result.correct {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.quiz-result.incorrect {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ---------- BUTTONS ---------- */
button {
  background: #38bdf8;
  color: #020617;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

button:hover {
  background: #0ea5e9;
}

button:disabled {
  background: #64748b;
  cursor: not-allowed;
}

/* ---------- CONTROLS & PROGRESS ---------- */
.controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
}

.progress {
  text-align: center;
  margin-top: 15px;
  font-size: 1.1rem;
  color: #94a3b8;
}

/* ---------- INPUTS ---------- */
input[type="number"] {
  width: 80px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #3b82f6;
  background: #1e293b;
  color: #e5e7eb;
  font-weight: bold;
  margin-top: 5px;
}

input[type="number"]:focus {
  outline: none;
  border-color: #22d3ee;
}

/* ---------- SIMULATOR SECTIONS ---------- */
.card h3 {
  color: #a5f3fc;
  margin-top: 15px;
  margin-bottom: 10px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .quiz-options {
    flex-direction: column;
  }

  input[type="number"] {
    width: 100%;
  }
}
