:root{
  --bg: #ffffff;
  --card: #ffffff;
  --accent: #d64545; /* red accent */
  --muted: #6b6f76;
  --surface-shadow: 0 6px 18px rgba(25,25,25,0.08);
  --radius:12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root{
    --bg: #000000;
    --card: #010101;
    --accent: #d64545; /* keep red in dark mode */
    --muted: #9aa0a6;
    --surface-shadow: 0 10px 30px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}

html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

#app{
  width:100%;
  max-width:460px;
  box-sizing:border-box;
  text-align:center;
}

#brand{
  margin:0 0 18px 0;
  font-size:16px;
  color:var(--muted);
  font-weight:600;
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--surface-shadow);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:stretch;
}

.label{
  font-size:13px;
  color:var(--muted);
  text-align:left;
  margin-bottom:4px;
  display:block;
}

input#server{
  height:52px;
  padding:12px 14px;
  font-size:16px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.06);
  outline:none;
  box-sizing:border-box;
  background: transparent;
  color: inherit;
}

/* muted style for disabled input (visual only; actual disabled attribute applied in JS) */
input#server.muted {
  opacity: 0.5;
}

/* checkbox row */
.toggle-row {
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
}
.toggle-row input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  accent-color: var(--accent);
  flex: 0 0 18px;
}
.toggle-row .label{
  margin:0;
  font-size:13px;
  color:var(--muted);
  text-align:left;
  display:inline-block;
}

input#server:focus{
  border-color: rgba(214,69,69,0.18);
  box-shadow: 0 6px 18px rgba(214,69,69,0.06);
}

.btn{
  height:52px;
  background:var(--accent);
  color:white;
  border:0;
  border-radius:10px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
}

.btn:active{transform:translateY(1px)}

@media (max-height:560px){
  body{padding:12px}
  .card{padding:12px}
  input#server, .btn{height:46px}
}

/* fallback shake animation for older browsers (used when JS can't call element.animate) */
.shake {
  animation: shake-legacy 220ms;
}
@keyframes shake-legacy {
  0% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}