.ogtn-dock {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(92px, env(safe-area-inset-bottom));
  z-index: 2147483200;
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(0, 229, 255, 0.34);
  border-radius: 10px;
  color: #f3f7ff;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(255, 45, 184, 0.08)),
    rgba(5, 7, 17, 0.94);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ogtn-dock,
.ogtn-dock * {
  box-sizing: border-box;
}

.ogtn-head,
.ogtn-row,
.ogtn-actions,
.ogtn-status {
  display: flex;
  align-items: center;
}

.ogtn-head {
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(132, 156, 255, 0.2);
}

.ogtn-title {
  min-width: 0;
}

.ogtn-title small,
.ogtn-pill,
.ogtn-stat span {
  font-family: Orbitron, "Arial Black", sans-serif;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ogtn-title small {
  display: block;
  color: #00e5ff;
}

.ogtn-title b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Orbitron, "Arial Black", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.ogtn-pill {
  flex: none;
  padding: 7px 9px;
  border: 1px solid rgba(163, 255, 60, 0.34);
  border-radius: 999px;
  color: #a3ff3c;
  background: rgba(163, 255, 60, 0.08);
}

.ogtn-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.ogtn-row {
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 9px 10px;
  border: 1px solid rgba(132, 156, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ogtn-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #aab7e5;
  font-size: 0.78rem;
  font-weight: 700;
}

.ogtn-row b {
  flex: none;
  color: #fff;
  font-size: 0.82rem;
}

.ogtn-status {
  gap: 8px;
  color: #c7d2ff;
  font-size: 0.84rem;
  line-height: 1.35;
}

.ogtn-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #ffb01f;
  box-shadow: 0 0 18px rgba(255, 176, 31, 0.45);
}

.ogtn-dot.is-online {
  background: #a3ff3c;
  box-shadow: 0 0 18px rgba(163, 255, 60, 0.45);
}

.ogtn-dot.is-error {
  background: #ff4f6d;
  box-shadow: 0 0 18px rgba(255, 79, 109, 0.45);
}

.ogtn-actions {
  gap: 8px;
}

.ogtn-btn {
  flex: 1 1 0;
  min-height: 40px;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 8px;
  color: #061014;
  background: linear-gradient(135deg, #00e5ff, #81ecff);
  cursor: pointer;
  font-family: Orbitron, "Arial Black", sans-serif;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ogtn-btn.ghost {
  color: #f3f7ff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 45, 184, 0.34);
}

.ogtn-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.ogtn-meter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ogtn-stat {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(132, 156, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.ogtn-stat span {
  display: block;
  color: #8895c6;
}

.ogtn-stat b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 0.9rem;
}

.ogtn-countdown {
  min-height: 28px;
  display: grid;
  place-items: center;
  color: #ffb01f;
  font-family: Orbitron, "Arial Black", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.ogtn-test-panel {
  padding: 10px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 45, 184, 0.08)),
    rgba(0, 0, 0, 0.22);
}

.ogtn-arcade-mini {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.ogtn-test-key {
  min-width: 0;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 6px 4px;
  border: 1px solid rgba(132, 156, 255, 0.2);
  border-radius: 999px;
  color: #c7d2ff;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.22);
  font-family: Orbitron, "Arial Black", sans-serif;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  transition: background 0.08s ease, border-color 0.08s ease, color 0.08s ease, transform 0.08s ease;
}

.ogtn-test-key.is-down {
  color: #061014;
  border-color: rgba(163, 255, 60, 0.76);
  background: linear-gradient(135deg, #a3ff3c, #64eaff);
  box-shadow: 0 0 18px rgba(100, 234, 255, 0.32);
  transform: translateY(1px);
}

@media (max-width: 680px) {
  .ogtn-dock {
    left: 10px;
    right: 10px;
    bottom: max(74px, env(safe-area-inset-bottom));
    width: auto;
  }

  .ogtn-meter {
    grid-template-columns: 1fr;
  }

  .ogtn-arcade-mini {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
