html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
  overflow-x: hidden;
}

#app-container {
  width: min(95vw, 60vh);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  container-type: inline-size;
}

#notes-svg {
  margin: 0 auto;
  display: block;
  max-height: 50vh;
  aspect-ratio: 1 / 1;
}

.buttons {
  margin: 0.5vh auto;
  text-align: center;
  width: 100%;
}

#notes-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.8em;
  justify-content: center;
  align-items: center;
  padding: 0;
  width: 100%;
}

button {
  padding: 0.8em 1.2em;
  font-size: clamp(1.1rem, 5cqw, 1.9rem);
  font-weight: 600;
  background-color: white;
  color: black;
  border: 3px solid black;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

#notes-buttons button {
  flex: 1;
  aspect-ratio: 1 / 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 8cqw, 2.5rem);
}

button:disabled {
  color: #999;
  border-color: #999;
  cursor: not-allowed;
}

button:hover:enabled {
  background: #f5f5f5;
}

.primary-btn {
  padding: clamp(0.5rem, 2.5cqw, 1rem) clamp(1rem, 5cqw, 2rem);
  min-width: 20cqw;
  font-size: clamp(1.1rem, 6cqw, 1.9rem);
}

.modal-btn {
  font-size: 1.1em;
  padding: 0.6em 1.2em;
}

.reset-btn {
  font-size: 0.9em;
  padding: 0.4em 0.8em;
  border-width: 2px;
}

.correct:disabled,
.incorrect:disabled,
.answer:disabled {
  color: black;
  border-color: black;
}

.correct:disabled {
  background: #4caf50;
}

.incorrect:disabled {
  background: #f44336;
}

.answer:disabled {
  background: #2196f3;
}

#streak {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(2.25rem, 16cqw, 9rem);
  font-weight: bold;
}

#timer {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.8rem, 11cqw, 5.8rem);
  font-variant-numeric: tabular-nums;
}

.settings-button {
  margin: auto 0 4vh 0;
  display: flex;
  justify-content: center;
  width: 100%;
}


#settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  column-gap: 2em;
  row-gap: 0.5em;
  padding: 1em 0;
}
@container (max-width: 450px) {
  #settings {
    grid-template-columns: 1fr;
  }
}

#settings label {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.6em;
  font-size: clamp(1.1rem, 4cqw, 1.4rem);
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

#settings label:hover {
  background-color: #f5f5f5;
  border-color: #ddd;
}

#settings input[type="checkbox"] {
  width: clamp(20px, 5cqw, 28px);
  height: clamp(20px, 5cqw, 28px);
  margin-right: 0.8em;
  cursor: pointer;
  accent-color: black;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  background-color: #fefefe;
  margin: 5vh auto;
  padding: clamp(1em, 5cqw, 2em);
  border: 4px solid black;
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  container-type: inline-size;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid black;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.modal-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 6cqw, 2rem);
}

.modal-footer {
  margin-top: 1em;
  display: flex;
  justify-content: center;
  border-top: 2px solid black;
  padding-top: 1em;
}