:root {
  --ink: #1a1423;
  --cream: #fff6e8;
  --gold: #f0c14b;
  --coral: #ff6b6b;
  --mint: #7dcea0;
  --night: #0d0a14;
  --panel: rgba(26, 20, 35, 0.72);
  --line: rgba(255, 246, 232, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--night);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(240, 193, 75, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 107, 107, 0.18), transparent 50%),
    radial-gradient(800px 500px at 50% 100%, rgba(125, 206, 160, 0.12), transparent 55%),
    linear-gradient(180deg, #1a1028 0%, #0d0a14 45%, #120c1a 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 12s ease-in-out infinite;
}

.glow-a {
  width: 280px;
  height: 280px;
  background: var(--gold);
  top: 12%;
  left: -40px;
}

.glow-b {
  width: 320px;
  height: 320px;
  background: var(--coral);
  bottom: 8%;
  right: -60px;
  animation-delay: -4s;
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28px) scale(1.05); }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.25rem;
  animation: rise 0.8s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(240, 193, 75, 0.08);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 10vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h1 span {
  background: linear-gradient(110deg, var(--gold), #ffe29a 40%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 1.1rem auto 0;
  max-width: 34rem;
  color: rgba(255, 246, 232, 0.78);
  font-size: 1.05rem;
}

.stats {
  margin-top: 1.25rem;
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 246, 232, 0.06);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.stat strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
}

.panel,
.wall {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  padding: 1.4rem 1.35rem;
  backdrop-filter: blur(14px);
  animation: rise 0.9s ease-out 0.1s both;
}

.panel {
  margin-bottom: 1.25rem;
}

.auth-box p {
  margin: 0 0 1rem;
  color: rgba(255, 246, 232, 0.8);
}

.hidden {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(120deg, var(--gold), #ffb347);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: rgba(255, 246, 232, 0.75);
  border: 1px solid var(--line);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.user-row img {
  border-radius: 50%;
  border: 2px solid rgba(240, 193, 75, 0.45);
}

.user-name {
  font-weight: 600;
}

.linkish {
  background: none;
  border: none;
  color: rgba(255, 246, 232, 0.55);
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

form label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(13, 10, 20, 0.55);
  color: var(--cream);
  padding: 0.9rem 1rem;
  font: inherit;
  outline: none;
}

textarea:focus {
  border-color: rgba(240, 193, 75, 0.55);
  box-shadow: 0 0 0 3px rgba(240, 193, 75, 0.15);
}

.form-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.55rem 0 1rem;
  font-size: 0.85rem;
  color: rgba(255, 246, 232, 0.55);
}

#form-status.ok { color: var(--mint); }
#form-status.err { color: var(--coral); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.wall h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.wall-sub {
  margin: 0 0 1rem;
  color: rgba(255, 246, 232, 0.55);
  font-size: 0.95rem;
}

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

.message-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 246, 232, 0.04);
  border: 1px solid var(--line);
  animation: rise 0.45s ease-out both;
}

.message-list img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.msg-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.msg-text {
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 246, 232, 0.88);
}

.msg-time {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: rgba(255, 246, 232, 0.4);
}

.foot {
  margin-top: 2rem;
  text-align: center;
  color: rgba(255, 246, 232, 0.4);
  font-size: 0.85rem;
}

.foot a {
  color: var(--gold);
}

@media (max-width: 520px) {
  .wrap { padding-top: 2.4rem; }
  .panel, .wall { padding: 1.15rem 1rem; }
  .form-actions .btn { width: 100%; }
}
