:root {
  --bg: #0C3B40;
  --btn: #406a6f;
  --btn-active: #2f4f52;
  --on: #A9BF5A;
  --on-active: #1c792b;
  --off: #F25E6B;
  --off-active: #c57373;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  background: var(--bg);
  touch-action: pan-y;
  font-family: var(--font);
  color: white;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, input {
  font-family: inherit;
}

.section {
  padding: 12px 8px 0;
}

.button-row {
  display: flex;
}

.btn {
  padding: 25px 0;
  background: linear-gradient(180deg, #4a767c 0%, var(--btn) 100%);
  color: white;
  flex: 1 1 1px;
  margin: 5px;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.08s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  background: var(--btn-active);
  transform: scale(0.97);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn.color-on {
  background: linear-gradient(180deg, #b6cb69 0%, var(--on) 100%);
  color: #1d2a0a;
}

.btn.color-off {
  background: linear-gradient(180deg, #f6727d 0%, var(--off) 100%);
}

.btn.color-on:active {
  background: var(--on-active);
  color: white;
}

.btn.color-off:active {
  background: var(--off-active);
}

/* Hover only on devices that can really hover, so it doesn't stick after a tap on iOS. */
@media (hover: hover) {
  .btn:hover {
    filter: brightness(1.08);
  }
}

.logout-row {
  display: flex;
  justify-content: flex-end;
  padding-right: 12px;
}

.logout-button {
  background: none;
  border: none;
  border-radius: 10px;
  opacity: 0.6;
  padding: 8px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}

.logout-button:active {
  background-color: #00000040;
  opacity: 1;
}

.login-section {
  padding: 24px 16px 0;
}

.login-section h1 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-section p {
  display: flex;
  gap: 8px;
  margin: 0;
}

.login-section input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  /* 16px prevents iOS Safari from zooming into the field on focus */
  font-size: 16px;
  outline: none;
}

.login-section input:focus {
  border-color: var(--on);
}

.login-section button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--on);
  color: #1d2a0a;
  font-size: 16px;
  font-weight: 600;
}

.login-section button:active {
  background: var(--on-active);
  color: white;
}
