:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: #0f1115;
  color: #e6e8ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #1a1f2b, #0f1115 60%);
}

.app--disabled .app {
  opacity: 0.6;
  pointer-events: none;
}

.app {
  width: min(720px, 92vw);
  padding: 32px;
  border-radius: 16px;
  background: #151a23;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.banner {
  display: none;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ff7a7a;
  background: rgba(255, 122, 122, 0.15);
  color: #ffb3b3;
  font-weight: 600;
}

.banner--visible {
  display: block;
}

.app__header h1 {
  margin: 0;
  font-size: 2rem;
}

.app__mode {
  margin: 6px 0 0;
  color: #a2a9b6;
}

.app__panel {
  margin: 24px 0;
  padding: 16px;
  border-radius: 12px;
  background: #10151d;
  display: grid;
  gap: 12px;
}

.app__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app__row--stack {
  flex-direction: column;
  align-items: flex-start;
}

.app__label {
  color: #7f8798;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.app__value {
  font-size: 1.1rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c6cbd6;
  font-size: 0.95rem;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2b5dff;
}

.settings {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #202532;
  background: #0f131b;
}

.settings__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.settings__summary::-webkit-details-marker {
  display: none;
}

.settings__badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #a2a9b6;
  border: 1px solid #2a2f3a;
}

.settings__badge--modified {
  color: #ffb347;
  border-color: #ffb347;
}

.settings__content {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.settings__help {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #202532;
  color: #8f97a6;
  font-size: 0.85rem;
  display: grid;
  gap: 6px;
}

.settings__help-label {
  color: #c6cbd6;
  font-weight: 600;
}

.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: #202532;
  color: #c6cbd6;
  font-size: 0.7rem;
  cursor: help;
}

.btn--small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.slider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider input[type="range"] {
  width: 100%;
  accent-color: #2b5dff;
}

.slider__value {
  min-width: 72px;
  text-align: right;
  color: #a2a9b6;
  font-size: 0.9rem;
}

.meter {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #0c1016;
  border: 1px solid #202532;
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff7a7a, #f4d35e, #61d47d);
  transition: width 0.08s ease;
}

.meter__value {
  min-width: 48px;
  text-align: right;
  color: #a2a9b6;
  font-size: 0.85rem;
}

.flash {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.2;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(0);
}

.flash--neutral {
  background: #1a1f2b;
  color: #a2a9b6;
}

.flash--correct {
  background: rgba(97, 212, 125, 0.15);
  color: #61d47d;
  opacity: 1;
  transform: translateY(-2px);
}

.flash--incorrect {
  background: rgba(255, 122, 122, 0.15);
  color: #ff7a7a;
  opacity: 0.95;
}

.status--neutral {
  color: #c6cbd6;
}

.status--correct {
  color: #61d47d;
}

.status--incorrect {
  color: #ff7a7a;
}

.app__hints {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: #7f8798;
}

@media (max-width: 640px) {
  .app {
    padding: 22px;
  }

  .app__header h1 {
    font-size: 1.6rem;
  }

  .app__panel {
    padding: 14px;
  }

  .app__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .app__controls {
    flex-direction: column;
  }

  .app__controls .btn {
    width: 100%;
  }

  .slider {
    flex-direction: column;
    align-items: stretch;
  }

  .slider__value,
  .meter__value {
    align-self: flex-end;
  }

  .meter {
    width: 100%;
  }
}

.app__controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  background: #2b5dff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.btn--secondary {
  background: #2a2f3a;
}

.btn--ghost {
  background: transparent;
  border: 1px solid #2a2f3a;
  color: #c6cbd6;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
