/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

/* Modal Overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.active {
  display: flex;
}

/* Modal Box */
.modal-content {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-out;
}

/* Instruction “Cards” */
.lead {
  background: #fafbfc;
  padding: 1rem;
  margin-bottom: 1.4rem;
  border-radius: 6px;
  /* soft drop-shadow */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  color: #555;
  line-height: 1.5;
  font-size: 1rem;
}

/* Typography */
h2 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: #333;
}
.highlight {
  font-weight: bold;
  color: #007bff;
}
.guess-number {
  font-size: 2.4rem;
  font-weight: bold;
  margin: 1rem 0;
  color: #007bff;
}

/* Buttons */
.btn {
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.btn.primary {
  background: #007bff;
  color: #fff;
}
.btn.primary:hover {
  background: #0056b3;
}
.btn.secondary {
  background: #6c757d;
  color: #fff;
}
.btn.secondary:hover {
  background: #5a6268;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

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