:root {
  --bg: #0a0a0a;
  --fg: #bfffea;
  --accent: #00ffd0;
  --accent2: #ff3df0;
  --muted: #6ddac6;
  --btn-bg: #101010;
  --btn-border: #00ffd080;
  --btn-hover: #00ffd0;
  --danger: #ff5577;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.2px;
}

.topbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(0deg, #00000088, #000000);
  border-bottom: 1px solid #0c0c0c;
  backdrop-filter: blur(6px);
}
.logo { width: 28px; height: 28px; opacity: 0.9; }
.title { font-weight: 700; color: var(--fg); }
.status { margin-left: auto; font-size: 12px; color: var(--muted); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 18px; }
.panel {
  border: 1px solid #111;
  background: #0d0d0d;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.panel::after {
  /* scanlines */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    #0000, #0000 2px,
    #0000000d 3px, #0000000d 4px
  );
  pointer-events: none;
}

.row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0;
}
.lbl { opacity: 0.9; font-size: 14px; }
.tty, .num, .cmd {
  background: #0c0c0c; color: var(--fg);
  border: 1px solid #1a1a1a; border-radius: 8px;
  padding: 10px 12px; outline: none;
}
.tty { min-width: 200px; }
.num { width: 100px; text-align: right; }
.cmd { flex: 1; min-width: 240px; }

.grid {
  margin-top: 14px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.btn {
  position: relative;
  background: var(--btn-bg);
  color: var(--fg);
  border: 2px solid var(--btn-border);
  border-radius: 12px;
  padding: 16px 14px;
  font-size: 16px; cursor: pointer;
  transition: transform 120ms ease, border-color 120ms, box-shadow 120ms;
  outline: none;
  user-select: none;
  overflow: hidden;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-1px);
  border-color: var(--btn-hover);
  box-shadow: 0 0 0 4px #00ffd018, 0 0 20px #00ffd018 inset;
}
.btn:active { transform: translateY(0) scale(0.98); }

.btn .label { font-weight: 700; }
.btn .cmd {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
  border: 0; padding: 0; background: transparent;
}

.send {
  background: #111; border-color: #00ffd080;
}
.send:hover { border-color: var(--accent); }

.switch {
  position: relative; display: inline-grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px;
}
.switch > input { display: none; }
.switch .slider {
  width: 46px; height: 24px; border-radius: 999px;
  background: #161616; border: 1px solid #222;
  position: relative; display: inline-block;
}
.switch .slider::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); transition: left 120ms ease;
  box-shadow: 0 0 10px #00ffd055;
}
.switch input:checked + .slider::after { left: 24px; background: var(--accent2); }
.switch-label { font-size: 14px; opacity: 0.9; }

.hint { margin-top: 10px; color: #8dd; font-size: 12px; opacity: 0.9; }

.ripple {
  position: absolute; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #00ffd080, #00ffd000 70%);
  pointer-events: none;
  animation: ripple 400ms ease-out forwards;
}
@keyframes ripple {
  from { width: 0; height: 0; opacity: 0.8; }
  to   { width: 320px; height: 320px; opacity: 0; }
}

.custom-row { margin-top: 14px; }
