:root {
  --bg: #0b0d12;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef1f7;
  --muted: #9aa3b5;
  --accent: #7c9cff;
  --accent-2: #b07cff;
  --ok: #6ee7b7;
  --err: #ff8f8f;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  width: 44rem;
  height: 44rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.glow-a { top: -18rem; left: -14rem; background: #4a6bff; }
.glow-b { bottom: -22rem; right: -16rem; background: #8a3bff; }

.shell {
  position: relative;
  z-index: 1;
  width: min(52rem, 100% - 2.5rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0 4rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero { margin-bottom: 2.25rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #ffffff 10%, #b9c6ff 55%, #c9a7ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0.9rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.field { position: relative; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input { margin-bottom: 0.75rem; }
textarea { resize: vertical; min-height: 6.5rem; }

input::placeholder, textarea::placeholder { color: #6b7488; }

input:focus, textarea:focus {
  outline: none;
  border-color: rgba(124, 156, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}

.counter {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.counter.warn { color: #ffcf7a; }

button {
  position: relative;
  border: 0;
  border-radius: 12px;
  padding: 0.72rem 1.35rem;
  font: inherit;
  font-weight: 600;
  color: #0a0d16;
  background: linear-gradient(120deg, #9db4ff, #c6a6ff);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: 0.6; cursor: progress; }

.spinner {
  display: none;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: 0.5rem;
  border: 2px solid rgba(10, 13, 22, 0.35);
  border-top-color: #0a0d16;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}
button.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.status {
  min-height: 1.2rem;
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  color: var(--err);
}
.status.ok { color: var(--ok); }

.feed { margin-top: 2.5rem; }

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feed-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #d5dbeb;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.15);
}
.badge.offline .dot { background: #ffb86b; box-shadow: 0 0 0 3px rgba(255, 184, 107, 0.15); }

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.card {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  animation: rise 0.35s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.avatar {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: rgba(10, 13, 22, 0.82);
  user-select: none;
}

.card .body { min-width: 0; flex: 1; }

.meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.18rem;
}

.who {
  font-weight: 600;
  font-size: 0.92rem;
  color: #e7ecf8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.when { font-size: 0.76rem; color: #79839a; white-space: nowrap; }

.text {
  margin: 0;
  color: #c8d0e2;
  font-size: 0.96rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty {
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.foot {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7488;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
