@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&display=swap');

body {
  margin: 0;
  font-family: 'Source Sans Pro', sans-serif;
  background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
  color: #334e68;
  line-height: 1.5;
}
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.app-title {
  text-align: center;
  font-size: 2.5rem;
  color: #102a43;
  margin-bottom: 1rem;
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.btn {
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  margin: 0.5rem 0.25rem 0;
}
.btn.primary   { background: #2f80ed; color: #fff; }
.btn.secondary { background: #e0eaf4; color: #334e68; }
.btn:disabled  { opacity: 0.5; cursor: default; }
label { display: block; margin: 0.75rem 0; }
input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #bcccdc;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 0.25rem;
}
.hidden { display: none; }
.error { color: #c53030; margin-top: 0.5rem; }
.info  { color: #2f80ed; margin-top: 0.5rem; }
#prompt {
  background: #f0f4f8;
  padding: 1rem;
  border: 1px solid #bcccdc;
  font-family: monospace;
  border-radius: 4px;
  font-size: 1.2rem;
  min-height: 3em;
  white-space: pre-wrap;
}
#prompt .correct { color: #2d9cdb; }
#prompt .error   { color: #eb5757; }
#prompt .current { text-decoration: underline; color: #f2c94c; }
#feedback { min-height: 1.2em; margin: 0.5rem 0; }
#student-progress-table table {
  width: 100%;
  border-collapse: collapse;
}
#student-progress-table th,
#student-progress-table td {
  border: 1px solid #bcccdc;
  padding: 0.5rem;
}
#student-progress-table th { background: #e0eaf4; }
.late-row { background: #fff3cd; }
#calendar table { width: 100%; border-collapse: collapse; }
#calendar th, #calendar td {
  border: 1px solid #bcccdc;
  padding: 4px;
  text-align: center;
}
#calendar td { transition: background 0.2s; }
.version-badge {
  position: fixed; bottom: 5px; right: 10px;
  font-size: 0.8em; color: gray;
  background: rgba(255,255,255,0.8); padding: 2px 5px;
  border-radius: 3px; pointer-events: none;
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .container { max-width: 100%; padding: 0 0.5rem; }
  .app-title { font-size: 2rem; }
  input, select, textarea { font-size: 1rem; }
}
