:root {
  color-scheme: dark;
  --status-color: #24f08f;
  --status-rgb: 36, 240, 143;
  --bg: #070908;
  --ink: #f5f7f4;
  --muted: #8d968f;
  --panel: rgba(12, 16, 14, 0.74);
  --line: rgba(255, 255, 255, 0.13);
  --danger: #ff5b76;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--status-rgb), 0.2), transparent 32%),
    radial-gradient(circle at 50% 52%, rgba(var(--status-rgb), 0.12), transparent 42%),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.signal {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.kicker,
.modal-kicker {
  margin: 0;
  color: rgba(var(--status-rgb), 0.92);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-word {
  max-width: 100%;
  margin: 8px 0 18px;
  color: var(--status-color);
  font-size: 12rem;
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(var(--status-rgb), 0.55),
    0 0 72px rgba(var(--status-rgb), 0.35);
  animation: pulse 2.4s ease-in-out infinite;
  overflow-wrap: anywhere;
}

.message-window {
  width: min(560px, 100%);
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(245, 247, 244, 0.88);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  line-height: 1.45;
}

.message-button,
.save-button,
.send-button,
.token-button,
.close-button {
  border: 1px solid rgba(var(--status-rgb), 0.42);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(var(--status-rgb), 0.12);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.message-button {
  min-width: 172px;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 18px;
  font-weight: 800;
}

.message-button:hover,
.save-button:hover,
.send-button:hover,
.token-button:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--status-rgb), 0.75);
  background: rgba(var(--status-rgb), 0.18);
}

.last-updated {
  min-height: 20px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 10, 0.92);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-weight: 900;
}

.token-button {
  min-height: 34px;
  padding: 0 12px;
  color: rgba(245, 247, 244, 0.86);
  font-size: 0.86rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  text-align: left;
}

label span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

input {
  height: 42px;
  padding: 0 12px;
}

input[type="color"] {
  padding: 4px;
}

textarea {
  resize: vertical;
  min-height: 86px;
  padding: 12px;
  line-height: 1.4;
}

input:focus,
textarea:focus {
  border-color: rgba(var(--status-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--status-rgb), 0.13);
}

.save-button,
.send-button {
  width: 100%;
  min-height: 44px;
  font-weight: 900;
}

.admin-feedback,
.modal-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.message-modal {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(8, 11, 10, 0.96);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.6);
}

.message-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.modal-card h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 1.4rem;
}

.close-button:hover {
  color: var(--ink);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.025);
    filter: brightness(1.18);
  }
}

@media (max-width: 700px) {
  .app-shell {
    align-items: center;
    padding: 16px;
  }

  .status-word {
    font-size: 6rem;
  }

  .message-window {
    min-height: 60px;
    padding: 15px;
    font-size: 0.95rem;
  }

  .admin-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

@media (max-height: 700px) {
  .status-word {
    font-size: 7rem;
    margin-bottom: 12px;
  }

  .message-button {
    margin-top: 12px;
  }

  .last-updated {
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .status-word {
    font-size: 4.6rem;
  }

  .kicker,
  .modal-kicker {
    font-size: 0.82rem;
  }
}
