:root {
  --bg-0: #0b1020;
  --bg-1: #0f1b3d;
  --fg: #f5f7ff;
  --muted: #b2bfdc;
  --card: rgba(16, 24, 50, 0.66);
  --line: rgba(190, 220, 255, 0.2);
  --accent-a: #3ef2ff;
  --accent-b: #7d7bff;
  --accent-c: #ff6ab0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--fg);
  background: radial-gradient(circle at 15% 20%, #1d2a57 0%, transparent 45%),
    radial-gradient(circle at 85% 10%, #40215e 0%, transparent 45%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1));
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 80%);
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.42;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.orb-a {
  top: -8vw;
  left: -8vw;
  background: var(--accent-a);
}

.orb-b {
  right: -8vw;
  bottom: -8vw;
  background: var(--accent-c);
  animation-delay: 1.5s;
}

.layout {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 28px 0 60px;
  position: relative;
}

.hero {
  text-align: center;
  margin-bottom: 22px;
}

.badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
}

.composer {
  padding: 18px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

input,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 10, 24, 0.6);
  color: var(--fg);
  border-radius: 12px;
  width: 100%;
  padding: 11px 13px;
  font: inherit;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus {
  outline: 2px solid var(--accent-a);
  outline-offset: 2px;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status {
  color: var(--muted);
  font-size: 14px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  color: #071026;
  background: linear-gradient(130deg, var(--accent-a), #a0ffdd);
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease;
}

button:hover {
  transform: translateY(-2px);
}

.wall {
  padding: 14px;
}

.wall-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 10px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

#count {
  color: var(--muted);
  font-size: 14px;
}

.messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 56vh;
  overflow: auto;
}

.message-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(14, 20, 38, 0.7);
  padding: 10px 12px;
  animation: pop 340ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.message-text {
  margin: 0;
  line-height: 1.4;
  white-space: pre-wrap;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@media (max-width: 720px) {
  .layout {
    width: min(1100px, 95vw);
  }

  .messages {
    max-height: 62vh;
  }
}
