/* 米米的信箱 · me.米米.life */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #f2ece1;
  --muted: #8b90a3;
  --dim: #5f6474;
  --gold: #ffc14d;
  --line: rgba(255, 255, 255, .075);
  --card: rgba(255, 255, 255, .035);
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  background-color: #0a0c11;
  background-image:
    radial-gradient(58% 42% at 12% 0%, rgba(255, 170, 80, .15), transparent 60%),
    radial-gradient(52% 44% at 88% 6%, rgba(126, 112, 255, .13), transparent 62%),
    radial-gradient(58% 48% at 72% 100%, rgba(48, 214, 152, .07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(100% - 36px, 760px);
  margin: 0 auto;
  padding: 40px 0 96px;
}

/* ---------- 头部 ---------- */
.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand::after {
  content: "✉";
  margin-left: 7px;
  font-size: 15px;
  opacity: .55;
}

.nav { display: flex; gap: 14px; align-items: center; font-size: 13px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.dim { color: var(--dim); }

.sub {
  margin: 2px 0 26px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.sub b { color: rgba(255, 193, 77, .9); font-weight: 600; }

.link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 193, 77, .3);
}
.link:hover { border-bottom-color: rgba(255, 193, 77, .75); }

.hero { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ---------- 对话 ---------- */
.thread { display: flex; flex-direction: column; gap: 18px; }

.msg { display: flex; flex-direction: column; gap: 8px; max-width: 86%; }
.msg.asker { align-self: flex-start; }
.msg.owner { align-self: flex-end; align-items: flex-end; }

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.who .name { color: rgba(255, 255, 255, .8); font-weight: 600; }
.who .score {
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 193, 77, .1);
  color: rgba(255, 193, 77, .85);
  font-size: 11px;
  letter-spacing: .02em;
}
.who time { font-variant-numeric: tabular-nums; color: var(--dim); }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .75);
  flex: none;
}

.avatar.me {
  background: linear-gradient(160deg, #ffe2a7, var(--gold) 55%, #f08a4b);
  color: #3a2408;
}

.bubble {
  padding: 14px 17px;
  border-radius: 16px 16px 16px 5px;
  background: var(--card);
  border: 1px solid var(--line);
  word-break: break-word;
}

.msg.owner .bubble {
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(180deg, rgba(255, 193, 77, .11), rgba(255, 193, 77, .05));
  border-color: rgba(255, 193, 77, .18);
}

.bubble.pending {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 13.5px;
}

.dots { display: inline-flex; gap: 3px; }
.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.2s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }

.item {
  display: block;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease;
}

.item:hover {
  border-color: rgba(255, 193, 77, .28);
  transform: translateY(-1px);
}

.item .line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}

.item .line1 b { color: rgba(255, 255, 255, .82); font-weight: 600; font-size: 13px; }
.item .line1 .score {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 193, 77, .8);
  font-size: 11px;
}
.item .line1 time { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }

.item .q {
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item .a {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item .a .tag {
  color: rgba(255, 193, 77, .8);
  font-size: 11.5px;
  margin-right: 6px;
}

.empty {
  padding: 46px 0;
  text-align: center;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 2.1;
}

/* ---------- 输入 / 管理 ---------- */
.panel {
  margin-top: 26px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .02em;
}

textarea, input[type="password"], input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .28);
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color .2s ease;
}

textarea:focus, input:focus { border-color: rgba(255, 193, 77, .45); }

textarea { min-height: 96px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.btn:hover { background: rgba(255, 255, 255, .1); }

.btn.primary {
  background: linear-gradient(180deg, #ffd27a, var(--gold) 55%, #f0a23f);
  border-color: transparent;
  color: #2a1a05;
  font-weight: 600;
}

.btn.ghost { color: var(--muted); }
.btn.danger { color: #ff9b9b; border-color: rgba(255, 120, 120, .25); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

.hint { color: var(--dim); font-size: 12px; }
.err { color: #ff9b9b; font-size: 13px; margin-top: 10px; }

/* 管理页的待回答条目 */
.admin-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 14px;
}

.admin-item .q { margin: 10px 0 14px; }
.admin-item .btn { margin-top: 10px; }

.meta-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
}
.pill.pending { color: rgba(255, 193, 77, .85); border-color: rgba(255, 193, 77, .25); }

/* ---------- 页脚 ---------- */
.foot { margin-top: 44px; display: flex; justify-content: center; }

.gongan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--dim);
  text-decoration: none;
  opacity: .85;
}
.gongan img { width: 18px; height: 20px; opacity: .7; }
.gongan:hover { opacity: 1; }

@media (max-width: 520px) {
  .wrap { width: min(100% - 28px, 760px); padding-top: 28px; }
  .brand { font-size: 19px; }
  .msg { max-width: 94%; }
  .sub { font-size: 13px; }
}
