:root {
  --bg: #0d1117;
  --bg-2: #141a23;
  --panel: #1a2230;
  --line: #2a3547;
  --text: #e6edf6;
  --muted: #8b98ab;
  --orange: #f0a500;
  --orange-dim: #a87300;
  --green: #57d18a;
  --red: #ff4d4d;
  --blue: #4aa8ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(240, 165, 0, .12), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(74, 168, 255, .10), transparent 55%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: linear-gradient(180deg, #171d28, #10151d);
  border-bottom: 2px solid var(--orange-dim);
}

.topbar__brand { display: flex; align-items: baseline; gap: 10px; }
.topbar__logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--orange);
  text-shadow: 0 0 14px rgba(240, 165, 0, .55);
}
.topbar__sep { color: var(--muted); }
.topbar__name { font-weight: 700; letter-spacing: 4px; font-size: 13px; color: var(--muted); }

.topbar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0e131b;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot--ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot--err { background: var(--red); box-shadow: 0 0 10px var(--red); }

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  padding: 18px 22px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.panel__title {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 2.5px;
  color: var(--muted);
}
.panel__num { color: var(--orange); font-weight: 900; }

.field { display: block; margin-bottom: 12px; }
.field__label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field__input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field__input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 165, 0, .15);
}
.field__input--area { min-height: 96px; resize: vertical; }

.counter { font-size: 11px; color: var(--muted); text-align: right; margin-bottom: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  width: 100%;
  color: #14100a;
  background: linear-gradient(180deg, #ffc14d, var(--orange));
  border-color: var(--orange-dim);
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--text); border-color: var(--muted); }
.btn--danger {
  color: #fff;
  background: linear-gradient(180deg, #ff6b6b, #d62f2f);
  border-color: #a01f1f;
}
.btn--danger:hover { filter: brightness(1.08); }

.form__hint {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.wall__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wall__count {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--orange);
  background: rgba(240, 165, 0, .12);
  border: 1px solid rgba(240, 165, 0, .35);
  padding: 3px 10px;
  border-radius: 20px;
}

.wall { display: flex; flex-direction: column; gap: 12px; min-height: 160px; }

.wall__loading,
.wall__empty {
  padding: 34px 16px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.wall__error {
  padding: 34px 16px;
  text-align: center;
  background: rgba(255, 77, 77, .08);
  border: 1px solid rgba(255, 77, 77, .45);
  border-radius: 8px;
}
.wall__error b { color: var(--red); display: block; margin-bottom: 8px; letter-spacing: 2px; }
.wall__error p { margin: 0; font-size: 12px; line-height: 1.6; color: var(--muted); }

.msg {
  background: linear-gradient(180deg, #1d2637, #18202e);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px 14px;
  animation: pop .2s ease;
}
.msg:hover { border-color: var(--orange-dim); }

@keyframes pop {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.msg__nick {
  font-weight: 800;
  font-size: 14px;
  color: var(--orange);
}
.msg__meta { display: flex; align-items: center; gap: 8px; }
.msg__date { font-size: 11px; color: var(--muted); }
.msg__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg__actions { margin-top: 10px; text-align: right; }
.msg__del {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
}
.msg__del:hover { color: var(--red); border-color: var(--red); }

.tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tag--ok { color: var(--green); background: rgba(87, 209, 138, .12); border: 1px solid rgba(87, 209, 138, .4); }
.tag--local { color: var(--orange); background: rgba(240, 165, 0, .12); border: 1px solid rgba(240, 165, 0, .4); }
.tag--pending { color: var(--orange); background: rgba(240, 165, 0, .12); border: 1px solid rgba(240, 165, 0, .4); }
.tag--fail { color: var(--red); background: rgba(255, 77, 77, .12); border: 1px solid rgba(255, 77, 77, .4); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0e131b;
  background: var(--orange);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  z-index: 40;
}
.toast--err { color: #fff; background: var(--red); }
.toast--ok { background: var(--green); }
.toast[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 13, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  animation: modalIn .18s ease;
}
.modal[hidden] { display: none; }
@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal__card {
  width: 100%;
  max-width: 420px;
  animation: cardIn .2s ease;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 8px;
  padding: 20px;
}
@keyframes cardIn {
  from { transform: translateY(14px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal__title {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--red);
}
.modal__target {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}
