:root {
  --bg: #0f0f12;
  --card: #15151a;
  --muted: #9aa0a6;
  --text: #e7e9ea;
  --primary: #7c3aed; /* purple */
  --primary-600: #6d28d9;
  --ok: #10b981;
  --err: #ef4444;
  --ring: rgba(124, 58, 237, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif;
  background: url("/assets/images/background-lines-white.webp") center/cover
      no-repeat fixed,
    radial-gradient(
      1000px 600px at 20% -10%,
      rgba(124, 58, 237, 0.15),
      transparent 100%
    ),
    radial-gradient(
      800px 500px at 100% 0%,
      rgba(124, 58, 237, 0.12),
      transparent 100%
    ),
    var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: color-mix(in srgb, var(--card) 90%, #000);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  animation: floatIn 0.6s ease both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

@keyframes floatIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: 0.2px;
}

p.sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.98rem;
}

label {
  display: block;
  font-size: 0.9rem;
  margin: 14px 0 8px;
  color: #c7cad1;
}

input,
textarea {
  width: 100%;
  background: #0f1014;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

input:hover,
textarea:hover {
  border-color: var(--primary);
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  transform: translateY(-1px);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

button {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.3s ease;
  min-width: 140px;
}

button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
  filter: brightness(1.05);
}

button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
}

.status.ok {
  display: block;
  background: color-mix(in srgb, var(--ok) 18%, #121316);
  color: #bff3dc;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, #000);
}

.status.err {
  display: block;
  background: color-mix(in srgb, var(--err) 18%, #121316);
  color: #ffd3d3;
  border: 1px solid color-mix(in srgb, var(--err) 30%, #000);
}

.fineprint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
}

.hidden-honeypot {
  position: absolute;
  left: -5000px;
}

.req {
  color: var(--primary);
  margin-left: 4px;
}

/* Discord icon button */
.discord-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: linear-gradient(180deg, #5865f2, #4752c4);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.3s ease;
}

.discord-btn:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.35);
  filter: brightness(1.05);
}

.discord-btn:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: none;
}

/* === Footer === */
footer {
  background-color: #222;
  color: #bbb;
  text-align: center;
  align-items: bottom;
  padding: 20px;
  font-size: 0.9rem;
}

/* ==== Page Transition (FADE) ==== */
:root {
  --pt-duration: 150ms; /* keep in sync with your brand tempo */
}

/* Full-screen overlay that fades away on load and fades in on exit */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none; /* let clicks pass through during reveal */
  background:
    radial-gradient(1000px 600px at 20% -10%, rgba(124,58,237,.15), transparent 40%),
    radial-gradient(800px 500px at 100% 0%, rgba(124,58,237,.12), transparent 40%),
    var(--bg);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.06);

  /* Start fully visible, then fade out on load */
  opacity: 1;
  animation: pt-fade-out var(--pt-duration) ease both;
}

/* On exit, fade overlay back in to cover the page */
body.transition-out #page-transition {
  pointer-events: auto; /* block clicks during exit */
  animation: pt-fade-in var(--pt-duration) ease both;
}

/* Keyframes */
@keyframes pt-fade-out {
  from { opacity: 1; }
  to   { opacity: 0.001; } /* near-zero to avoid paint flashes */
}

@keyframes pt-fade-in {
  from { opacity: 0.001; }
  to   { opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #page-transition,
  body.transition-out #page-transition {
    animation: none !important;
    opacity: 0 !important;
    display: none !important;
  }
}
