body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  color: #1f2937;
}

.container {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  width: 90vw;
  max-width: 600px;
  height: 85vh;
  max-height: 85vh;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .container {
    height: 85vh;
    max-height: 85vh;
  }
}

h1 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

h2 {
  margin-bottom: 0.5rem;
  font-weight: normal;
  font-size: 1rem;
  color: #374151;
}

.mode-selector {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.mode-selector label {
  font-weight: 600;
  font-size: 1.1rem;
}

.mode-selector select {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 2px solid #4f46e5;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  color: #1f2937;
  font-weight: 500;
}

.mode-selector select:hover {
  background: #f0f0ff;
}

.mode-selector select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

#addToPractice:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#addToPractice:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
}

.buttons button,
.actions button {
  margin: 0.6rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #4f46e5;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .buttons button,
  .actions button {
    font-size: 1.35rem;
    padding: 1.1rem 1.5rem;
    margin: 0.7rem;
  }
}

input {
  width: 100%;
  padding: 0.8rem;
  margin-top: 1rem;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  input {
    font-size: 1.15rem;
    padding: 0.9rem;
  }
}

#feedback {
  margin-top: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  #feedback {
    font-size: 1.15rem;
  }
}

/* ---- Popup overlay ---- */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  text-align: left;
}

#closePopup {
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #4f46e5;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

#closePopup:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

/* ---- Button glow effect ---- */
button.glow {
  box-shadow: 0 0 15px 4px rgba(79, 70, 229, 0.7);
  transform: translateY(-1px);
}
