#trench-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: "Courier New", Consolas, monospace;
}

#trench-widget .trench-toggle {
  border: 1px solid rgba(255, 189, 46, 0.58);
  border-radius: 8px;
  background: rgba(12, 18, 5, 0.96);
  color: #ffbd2e;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 189, 46, 0.14), 0 18px 42px rgba(0, 0, 0, 0.52);
  text-transform: uppercase;
}

#trench-widget .trench-panel {
  display: none;
  width: min(390px, calc(100vw - 36px));
  max-height: min(660px, calc(100vh - 96px));
  margin-bottom: 12px;
  border: 1px solid rgba(170, 255, 51, 0.28);
  border-radius: 13px;
  background:
    linear-gradient(rgba(170,255,51,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,255,51,0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(170, 255, 51, 0.14), transparent 13rem),
    linear-gradient(180deg, rgba(9, 14, 4, 0.99), rgba(3, 5, 1, 0.99));
  background-size: 18px 18px, 18px 18px, auto, auto;
  color: #eef8d7;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255,255,255,0.04);
}

#trench-widget .trench-panel.open { display: block; }

#trench-widget header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(170, 255, 51, 0.18);
  background: rgba(0, 0, 0, 0.24);
}

#trench-widget header strong {
  display: block;
  color: #ffbd2e;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#trench-widget header small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: #aaff33;
  font-size: 11px;
  text-transform: uppercase;
}

#trench-widget header i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaff33;
  box-shadow: 0 0 11px #aaff33;
}

#trench-widget .trench-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef8d7;
  cursor: pointer;
  font-weight: 900;
}

#trench-widget .trench-log {
  max-height: 265px;
  overflow: auto;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

#trench-widget .trench-log p {
  margin: 0 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(170, 255, 51, 0.14);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  color: #dceac7;
}

#trench-widget .trench-log .bot {
  border-color: rgba(170, 255, 51, 0.23);
  color: #aaff33;
}

#trench-widget .trench-log .bot a {
  color: #ffbd2e;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#trench-widget .trench-log .bot a:hover,
#trench-widget .trench-log .bot a:focus {
  color: #fff2a8;
}

#trench-widget .trench-log .user {
  margin-left: 30px;
  border-color: rgba(255, 189, 46, 0.30);
  color: #ffcf68;
}

#trench-widget .trench-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(170, 255, 51, 0.16);
}

#trench-widget .trench-options button {
  min-height: 36px;
  border: 1px solid rgba(170, 255, 51, 0.22);
  border-radius: 999px;
  background: rgba(170, 255, 51, 0.07);
  color: #dceac7;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

#trench-widget .trench-options button:hover,
#trench-widget .trench-options button:focus {
  border-color: rgba(170, 255, 51, 0.62);
  color: #aaff33;
}

#trench-widget .trench-input {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(170, 255, 51, 0.16);
}

#trench-widget .trench-input input {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(170, 255, 51, 0.18);
  border-radius: 7px;
  background: rgba(0,0,0,0.28);
  color: #eef8d7;
  padding: 0 10px;
  outline: none;
}

#trench-widget .trench-input input:focus {
  border-color: rgba(255, 189, 46, 0.56);
}

#trench-widget .trench-input button {
  border: 1px solid rgba(170, 255, 51, 0.32);
  border-radius: 7px;
  background: rgba(170, 255, 51, 0.12);
  color: #aaff33;
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 520px) {
  #trench-widget {
    right: 10px;
    bottom: 10px;
  }

  #trench-widget .trench-panel {
    width: calc(100vw - 20px);
  }

  #trench-widget .trench-options {
    grid-template-columns: 1fr;
  }
}
