* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #111827;
  color: #f9fafb;
  font-family: Arial, sans-serif;
}

.trainer {
  width: min(94%, 520px);
  margin: 35px auto;
}

h1 {
  text-align: center;
  font-size: 28px;
}

h2 {
  font-size: 16px;
  margin-top: 24px;
}

p {
  color: #9ca3af;
  text-align: center;
}

.settings,
.practice {
  background: #1f2937;
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
}

.note-options {
  display: block;
}

.note-options h3 {
  font-size: 14px;
  color: #9ca3af;
  margin: 20px 0 10px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.note-grid label {
  background: #374151;
  border-radius: 8px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
}

.note-grid input {
  margin-right: 5px;
  accent-color: #22c55e;
}

.presets,
.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

button {
  background: #22c55e;
  color: #052e16;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

select {
  width: 100%;
  padding: 12px;
  background: #374151;
  color: white;
  border: 1px solid #4b5563;
  border-radius: 8px;
  font-size: 16px;
}

#note {
  text-align: center;
  font-size: 110px;
  font-weight: bold;
  padding: 20px 0;
}

#remaining {
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
}

#status {
  font-size: 14px;
}

@media (max-width: 400px) {
  .trainer {
    margin-top: 15px;
  }

  .settings,
  .practice {
    padding: 15px;
  }

  #note {
    font-size: 85px;
  }

  .controls {
    gap: 6px;
  }

  .controls button {
    padding: 10px 6px;
    font-size: 13px;
  }
}
