:root {
  --card-radius: 16px;
  --shadow: 0 6px 18px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg,#ffd7e9 0%,#cfe9ff 100%);
  color: #222;
}

.page {
  width: 95%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.hidden { display: none; }

input[type="text"], input {
  width: 62%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #e6e6e6;
  font-size: 16px;
  outline: none;
}

button {
  padding: 10px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 12px;
  background: #0066ff;
  color: white;
  cursor: pointer;
  font-size: 15px;
  transition: transform .12s ease, opacity .12s;
}
button:active { transform: translateY(1px); }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* message area */
#messages {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

/* 单个卡片 */
.card {
  width: 160px;
  border-radius: var(--card-radius);
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  text-align: center;
  background: rgba(255,255,255,0.9);
  transition: opacity .4s ease, transform .25s ease;
  will-change: opacity, transform;
}
.username {
  font-size: 13px;
  opacity: .86;
}
.letter {
  margin-top: 8px;
  font-size: 36px;
  font-weight: 700;
}

/* 动画：出现时轻微放大 */
@keyframes appear {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.card { animation: appear .18s ease; }
