/* =========
   Base (MATCHES main page)
   ========= */
:root{
  /* Background */
  --bg0: #071225;
  --bg1: #050a14;

  /* Glass card */
  --card: rgba(255,255,255,0.08);
  --cardBorder: rgba(255,255,255,0.16);

  /* Text */
  --text: rgba(255,255,255,0.94);
  --muted: rgba(255,255,255,0.68);

  /* Brand accents (orange + blue) */
  --accent-rgb: 255 122 24;   /* orange */
  --accent2-rgb: 59 130 246;  /* blue */

  --danger: #fb7185;

  --shadow: 0 22px 70px rgba(0,0,0,0.45);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);

  /* same background style as main page */
  background:
    radial-gradient(1200px 700px at 15% 10%, rgb(var(--accent-rgb) / 0.26), transparent 55%),
    radial-gradient(900px 600px at 85% 30%, rgb(var(--accent2-rgb) / 0.22), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(255,255,255,0.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

/* =========
   Card
   ========= */
.card{
  width: min(460px, 92vw);
  padding: 26px 22px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--cardBorder);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* top glow line (now orange -> blue) */
.card::before{
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgb(var(--accent-rgb) / 0.60),
    rgb(var(--accent2-rgb) / 0.50)
  );
  opacity: 0.9;
}

/* tiny floating highlights (orange glow) */
.card::after{
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgb(var(--accent-rgb) / 0.30), transparent 60%);
  top: -90px;
  right: -90px;
  filter: blur(4px);
  pointer-events: none;
}

h1{
  margin: 8px 0 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 30px;
  line-height: 1.1;
}

/* =========
   Message area
   ========= */
#msg{
  margin: 0 0 14px;
  min-height: 18px;
  font-size: 14px;
  color: var(--muted);
}

#msg.success{
  color: rgb(var(--accent2-rgb) / 0.95); /* blue success */
}
#msg.error{
  color: rgba(251,113,133,0.95); /* danger */
}

/* =========
   Form inputs
   ========= */
#loginForm{
  display: grid;
  gap: 12px;
}

input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 12, 22, 0.42);
  color: var(--text);
  outline: none;

  font-size: 15px;
  line-height: 1.2;

  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

input::placeholder{
  color: rgba(255,255,255,0.5);
}

input:focus{
  border-color: rgb(var(--accent2-rgb) / 0.60); /* blue focus */
  box-shadow: 0 0 0 4px rgb(var(--accent2-rgb) / 0.12), 0 10px 25px rgba(0,0,0,0.25);
}

input:active{
  transform: translateY(0.5px);
}

/* =========
   Buttons / Controls
   ========= */
.controls{
  display: grid;
  gap: 10px;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
}

button{
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  color: rgba(255,255,255,0.92);

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);

  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

button:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

button:active{
  transform: translateY(0.5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

button:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.14), 0 10px 25px rgba(0,0,0,0.25);
}

/* Primary button (orange -> blue gradient) */
#loginForm .controls button[type="submit"]{
  background: linear-gradient(
    135deg,
    rgb(var(--accent-rgb) / 0.92),
    rgb(var(--accent2-rgb) / 0.82)
  );
  border: 1px solid rgba(255,255,255,0.20);
}

#loginForm .controls button[type="submit"]:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

#registerBtn{
  background: rgba(255,255,255,0.07);
}

/* Guest button full width */
#guestBtn{
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.06);
}

/* spacing between form and guest */
#loginForm + .controls{
  margin-top: 14px;
}

/* =========
   Form inputs (Login + Reset PIN)
   ========= */
#loginForm,
#resetForm{
  display: grid;
  gap: 12px;
}

/* Extra breathing room before the button row inside forms */
#loginForm .controls,
#resetForm .controls{
  margin-top: 6px;
}

/* If you want the Reset page buttons spaced a bit more specifically */
#resetForm .controls{
  margin-top: 10px;
}


/* =========
   Mobile tweaks
   ========= */
@media (max-width: 420px){
  .card{
    padding: 22px 16px 18px;
  }
  h1{
    font-size: 26px;
  }
  .controls{
    grid-auto-flow: row;
    grid-auto-columns: 1fr;
  }
}
