:root {
  --bg: #101010;
  --panel: #1c1c1e;
  --text: #f2f2f2;
  --muted: #a0a0a8;
  --accent: #00a4dc;
  --accent-2: #aa5cc3;
  --error: #ff6b6b;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

html, body {
  margin: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #1d2733 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 32px;
}

#app {
  /* Safe area: TV overscan */
  padding: 64px 120px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand { text-align: center; margin-bottom: 48px; }
.logo { width: 140px; height: 140px; }
.brand h1 { margin: 8px 0 0; font-size: 72px; font-weight: 300; letter-spacing: 2px; }
.tag { margin: 4px 0 0; color: var(--muted); font-size: 24px; }

.view { width: 1100px; display: flex; flex-direction: column; align-items: stretch; }
.view h2 { font-weight: 400; font-size: 44px; margin: 0 0 32px; }
.hidden { display: none !important; }

.server-list { list-style: none; margin: 0 0 24px; padding: 0; max-height: 470px; overflow: hidden; }
.server-list li { margin-bottom: 16px; display: flex; gap: 16px; }
.server-list .server { flex: 1; text-align: left; }
.server .name { display: block; font-size: 36px; }
.server .url { display: block; font-size: 24px; color: var(--muted); margin-top: 4px; }
.server-list .remove { flex: 0 0 auto; }
.empty { color: var(--muted); margin: 0 0 24px; }

.btn {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 4px solid transparent;
  border-radius: 16px;
  padding: 22px 36px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn.primary { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

label { color: var(--muted); font-size: 26px; margin-bottom: 12px; }
input {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 4px solid #333;
  border-radius: 16px;
  padding: 22px 28px;
}
.hint { color: var(--muted); font-size: 24px; margin: 16px 0 0; }
.error { color: var(--error); font-size: 28px; min-height: 40px; margin: 16px 0; }
.row { display: flex; gap: 24px; }

.focused, .btn:focus-visible, input:focus-visible {
  outline: none;
  border-color: #fff;
  transform: scale(1.04);
  box-shadow: 0 0 0 6px rgba(0, 164, 220, .35);
}
input.focused { transform: none; }

#loading-view { align-items: center; text-align: center; }
.spinner {
  width: 96px; height: 96px;
  border: 10px solid #333;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px 0 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dialog {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex; align-items: center; justify-content: center;
}
.dialog-box { background: var(--panel); border-radius: 24px; padding: 56px 72px; text-align: center; }
.dialog-box h2 { font-weight: 400; margin: 0 0 40px; }
.dialog-box .row { justify-content: center; }
