:root {
  --bg: #0c0f1a;
  --card: rgba(22, 27, 45, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #eef1f8;
  --muted: #9aa3bd;
  --accent: #facc15;     /* TaxSMP yellow */
  --accent2: #f59e0b;
  --discord: #5865f2;
  --danger: #f87171;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 50% -10%, #1a2340 0%, var(--bg) 55%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 400px at 15% 20%, rgba(250, 204, 21, 0.12), transparent 60%),
    radial-gradient(600px 400px at 85% 80%, rgba(245, 158, 11, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  position: relative;
  z-index: 1;
}

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.user-chip .logout {
  margin-left: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  border-left: 1px solid var(--card-border);
  padding-left: 10px;
}
.user-chip .logout:hover { color: var(--danger); }

/* ---- Logo ---- */
.logo-badge {
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(250, 204, 21, 0.25);
}
.logo-badge span { color: var(--accent); }
.logo-badge.sm { font-size: 20px; }

/* ---- Card ---- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: rise 0.5s ease both;
}
.card.center { text-align: center; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero .logo-badge { font-size: 44px; display: block; margin-bottom: 18px; }

h1 { font-size: 28px; margin: 8px 0 10px; letter-spacing: -0.4px; }
.sub { color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 48ch; margin: 0 auto 22px; }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 18px; opacity: 0.8; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #2a2100; }
.btn-discord { background: var(--discord); color: #fff; font-size: 16px; padding: 14px 26px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--card-border); }
.btn-ghost:hover { color: var(--text); }

/* ---- Status icons ---- */
.status-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 32px;
  margin: 0 auto 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
}
.status-icon.accepted { background: rgba(250, 204, 21, 0.15); color: var(--accent); border-color: rgba(250,204,21,0.35); }
.status-icon.denied { background: rgba(248, 113, 113, 0.15); color: var(--danger); border-color: rgba(248,113,113,0.3); }

/* ---- Waiting / spinner ---- */
.spinner {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  margin: 4px auto 18px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pulse-dots { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.pulse-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
.pulse-dots span:nth-child(2) { animation-delay: 0.2s; }
.pulse-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }

.accepted h1 { color: var(--accent); }

/* ---- Form intro / notices ---- */
.info-block { margin: 18px 0 8px; }
.info-p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0 0 12px; }
.notice-box {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
}
.notice-box h3 { margin: 0 0 10px; font-size: 15px; }
.notice-box ul { margin: 0; padding-left: 20px; }
.notice-box li { color: var(--muted); font-size: 14px; line-height: 1.7; }
.danger-box {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
}
.danger-box h3 { color: #fca5a5; }
.req-legend { font-size: 13px; color: var(--muted); margin: 18px 0 4px; }

.field .help { color: var(--muted); font-size: 12.5px; margin-top: -2px; line-height: 1.5; }
.muted-hint { color: var(--muted); font-size: 12.5px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-weight: 500 !important;
  line-height: 1.55;
}
.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- Form ---- */
.form-card { padding: 36px 32px; }
.app-form { margin-top: 22px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field .req { color: var(--accent); margin-left: 3px; }
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
}
.field.has-error input, .field.has-error textarea, .field.has-error select {
  border-color: var(--danger);
}
.err-msg { color: var(--danger); font-size: 12.5px; }
.alert {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 16px;
}
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 18px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

@media (max-width: 540px) {
  .card { padding: 30px 22px; }
  h1 { font-size: 23px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}
