:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

h1 { margin: 0 0 4px; font-size: 26px; }
.sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input, textarea {
  width: 100%;
  background: #0b1220;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
  resize: vertical;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  background: var(--accent);
  color: #0b1220;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}

button:hover { filter: brightness(1.05); }

.list { list-style: none; padding: 0; margin: 24px 0 0; }

.list li {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.name { font-weight: 600; color: var(--accent); }
.time { font-size: 12px; color: var(--muted); }
.msg-body { white-space: pre-wrap; word-break: break-word; }

.del {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 4px 10px;
  font-size: 12px;
}

.empty { text-align: center; color: var(--muted); background: transparent; }
