body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f0f2f5;
  padding-bottom: 64px;
}

.screen {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 80%;
  max-width: 400px;
}

.hidden {
  display: none;
}

input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 123, 255, 0.2);
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    background-color 180ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; /* Removes the ugly grey box on iOS */
  user-select: none;
}

button::after {
  content: "";
  position: absolute;
  inset: -120% -25%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 65%
  );
  transform: translateX(-130%);
  transition: transform 420ms ease;
  pointer-events: none;
}

button.is-pressed {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 3px 7px rgba(0, 123, 255, 0.22);
  filter: saturate(1.06) brightness(0.98);
}

button.is-pressed::after {
  transform: translateX(130%);
}

button.awaiting-completion {
  filter: saturate(1.15);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35) inset,
    0 0 0 1px rgba(0, 123, 255, 0.35),
    0 8px 20px rgba(0, 123, 255, 0.25);
}

button.is-releasing {
  animation: button-release 260ms cubic-bezier(0.2, 0.9, 0.28, 1);
}

@keyframes button-release {
  0% {
    box-shadow: 0 4px 9px rgba(0, 123, 255, 0.2);
    filter: brightness(0.99);
  }
  45% {
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.27);
    filter: brightness(1.05);
  }
  100% {
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.2);
    filter: brightness(1);
  }
}

.minimal-reset {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: auto;
  padding: 6px 12px;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.06);
  color: #4b5563;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(2px);
  z-index: 999;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.minimal-reset:hover {
  background: rgba(0, 0, 0, 0.1);
}

.minimal-reset.is-pressed {
  transform: translateX(-50%) translateY(2px) scale(0.985);
}

button.secondary {
  background-color: #6c757d;
  margin-top: 20px;
}

ul {
  text-align: left;
  margin-top: 20px;
}

.pressed {
  background-color: #9c9c9c;
}

.users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.users-header h2 {
  margin: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 10px;
  border-radius: 8px;
  background-color: #007bff;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background-color: #0069d9;
}

.icon-btn.reloading svg {
  animation: spin 0.8s linear infinite;
}

.server-indicator {
  position: fixed;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(2px);
  z-index: 1000;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.server-indicator.is-waking .status-dot {
  animation: status-pulse 1s ease-in-out infinite;
}

.server-indicator.is-online .status-dot {
  background: #16a34a;
  animation: none;
}

.server-indicator.is-offline .status-dot {
  background: #dc2626;
  animation: none;
}

@keyframes status-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.65;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
