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

:root {
  --bg: #1e1f22;
  --surface: #2b2d31;
  --surface2: #313338;
  --accent: #5865f2;
  --boost: #ff73fa;
  --text: #dbdee1;
  --muted: #949ba4;
  --radius: 12px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
}

#app {
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px 40px;
  max-width: 700px;
  margin: 0 auto;
}

/* ── Loading ── */
#loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80vh;
  gap: 16px;
  color: var(--muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Hello World ── */
#hello-world {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

#guild-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

#guild-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#guild-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#guild-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

#boost-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--boost);
  background: rgba(255, 115, 250, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.stat-icon { font-size: 26px; }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── Members ── */
.members-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}

#members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.1s;
}

.member-row:hover { background: var(--surface2); }

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}

.member-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.member-name {
  font-weight: 500;
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-tag {
  font-size: 12px;
  color: var(--muted);
}

/* ── Bouncy link ── */
#bouncy-link {
  display: block;
  margin-top: 32px;
  text-align: center;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
}
#bouncy-link:hover { background: var(--surface2); }

/* ── Pierre ── */
#pierre {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ── Stans Dad ── */
#stans-dad {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: #a855f7;
}

/* ── Error ── */
#error-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80vh;
  color: #f04747;
  text-align: center;
  font-size: 15px;
}
