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

:root {
  --blue:         #5865F2;
  --github:       #24292e;
  --google:       #fff;
  --google-border:#dadce0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow: hidden;
  position: relative;
  background: #070d1f;
  padding-top: 64px; /* clear the fixed navbar */
}

/* ── Background — matches homepage ── */
.bg-layer {
  position: fixed; inset: 0;
  background: url('../images/bg2.png') repeat-x center bottom;
  background-size: auto 100%;
  animation: bgscroll 28s linear infinite;
  z-index: 0;
  opacity: .35;
}
.cloud-layer {
  position: fixed; inset: 0;
  background: url('../images/cloud.gif') repeat-x top center;
  background-size: auto 110px;
  animation: bgscroll 40s linear infinite;
  opacity: .2;
  z-index: 1;
}
@keyframes bgscroll {
  from { background-position-x: 0; }
  to   { background-position-x: -2000px; }
}

/* ── Decorative flying birds — matches homepage exactly ── */
.deco-bird {
  position: fixed;
  left: 0;
  z-index: 2;
  pointer-events: none;
  animation: fly linear infinite;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
}
.b1 { top: 12%; animation-duration: 14s; animation-delay: 0s;  width: 52px; height: 42px; }
.b2 { top: 42%; animation-duration: 10s; animation-delay: -5s; width: 68px; height: 54px; }
.b3 { top: 68%; animation-duration: 18s; animation-delay: -9s; width: 44px; height: 36px; }
@keyframes fly {
  from { transform: translateX(-120px); }
  to   { transform: translateX(110vw); }
}

/* Two frames per bird — alternate opacity for wing flap */
.deco-bird img {
  position: absolute; top: 0; left: 0;
  width: 100%; display: block;
}
.deco-bird img.frame-a { animation: flap-a 0.20s steps(1) infinite; }
.deco-bird img.frame-b { animation: flap-b 0.20s steps(1) infinite; }
.b2 img { animation-duration: 0.15s; }
.b3 img { animation-duration: 0.18s; }
@keyframes flap-a {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes flap-b {
  0%, 49%   { opacity: 0; }
  50%, 100% { opacity: 1; }
}

/* ── Navbar ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: rgba(7,13,31,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo span {
  font-size: 1.2rem; font-weight: 900; color: #14F195;
  letter-spacing: -.3px; text-shadow: 0 0 12px rgba(20,241,149,.35);
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: rgba(255,255,255,.65); font-size: .9rem; text-decoration: none;
  padding: 6px 14px; border-radius: 20px; transition: color .2s, background .2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-cta {
  background: linear-gradient(135deg, #9945FF, #14F195);
  color: #fff; font-weight: 800; font-size: .9rem;
  text-decoration: none; padding: 9px 22px; border-radius: 20px;
  box-shadow: 0 4px 18px rgba(153,69,255,.4);
  transition: transform .15s, filter .15s;
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ── */
.nav-drawer {
  display: none;
  position: fixed; top: 57px; left: 0; right: 0; z-index: 99;
  background: rgba(7,13,31,0.97);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-direction: column;
  padding: 16px 20px 20px; gap: 4px;
}
.nav-drawer.open { display: flex; }
.drawer-link {
  color: rgba(255,255,255,.75); font-size: 1rem; font-weight: 600;
  text-decoration: none; padding: 12px 16px; border-radius: 12px;
  display: block; transition: background .2s, color .2s;
}
.drawer-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.drawer-cta {
  margin-top: 8px;
  display: block; text-align: center;
  background: linear-gradient(135deg, #9945FF, #14F195);
  color: #fff; font-size: 1rem; font-weight: 800;
  text-decoration: none; padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 4px 18px rgba(153,69,255,.35);
}

/* ── Mobile breakpoint ── */
@media (max-width: 640px) {
  nav { padding: 12px 18px; }
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }
}


.login-card {
  position: relative;
  z-index: 10;
  background: rgba(8, 8, 26, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 48px 40px 36px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.65);
  animation: cardIn .5s ease-out;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo area ── */
.logo-wrap { margin-bottom: 34px; }
.logo-bird {
  width: 72px;
  animation: hop .85s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 14px rgba(153,69,255,.5));
}
@keyframes hop {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  margin-top: 10px;
  text-shadow: 0 2px 14px rgba(153,69,255,.45);
}
.tagline {
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  margin-top: 6px;
}

/* ── OAuth buttons ── */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 13px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, filter .15s;
  cursor: pointer;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(0,0,0,.38); }
.btn:active { transform: translateY(0);    filter: brightness(.9); }
.btn-icon   { width: 22px; height: 22px; flex-shrink: 0; }

.btn-google  { background: var(--google); color: #3c4043; border: 1px solid var(--google-border); }
.btn-github  { background: var(--github); color: #fff;    border: 1px solid #444; }
.btn-discord { background: var(--blue);   color: #fff; }

/* ── Error message ── */
.error-msg {
  background: rgba(220,53,69,.18);
  border: 1px solid #dc3545;
  color: #ff8a94;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: .88rem;
  margin-bottom: 18px;
}

/* ── Footer ── */
.footer-note {
  color: rgba(255,255,255,.28);
  font-size: .76rem;
  margin-bottom: 14px;
  line-height: 1.6;
}
.policy-link {
  color: rgba(153,69,255,.8);
  text-decoration: none;
  transition: color .2s;
}
.policy-link:hover { color: #14F195; }
.back-home {
  display: inline-block;
  color: rgba(255,255,255,.4);
  font-size: .78rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 6px 16px;
  transition: color .2s, border-color .2s, background .2s;
}
.back-home:hover {
  color: #fff;
  border-color: rgba(153,69,255,.5);
  background: rgba(153,69,255,.1);
}

@media (max-width: 480px) {
  .login-card { padding: 36px 22px 28px; margin: 16px; }
  h1 { font-size: 1.9rem; }
}
