/* ---------- Site base ---------- */
:root{
  --text: #e8eefc;
}

html, body{
  height: 100%;
  margin: 0;    
  padding: 0;
  overflow: hidden;   
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* ---------- Nav (shown on most pages) ---------- */
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 1rem;
}

.brand{
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* ---------- Login page layout ---------- */
.login-wrap{
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;          
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;      
  background: #07121f;    
}

.login-stage{
  position: relative;
  width: 100vw;
  height: 100vh;

  border-radius: 0;
  overflow: hidden;
}


.login-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* KEY */
  object-position: center;
}

@media (max-aspect-ratio: 3/4){
  .login-form .field.username{ top: 62%; }
  .login-form .field.password{ top: 70%; }
  .login-btn{ bottom: 120px; }
}

/* The overlay form sits on top of the image */
.login-form{
  position: absolute;
  inset: 0;

  max-width: 1600px;
  margin: 0 auto;
}

/* Inputs positioned relative to the image */
.login-form .field{
  position: absolute;
  left: 50%;
  transform: translateX(-54.75%);
  width: 35.75%;
}

/* Fine-tune these TOP % values to match your background’s input slots */
.login-form .field.username{ top: 68.25%; }
.login-form .field.password{ top: 75%; }

/* Style the actual Django inputs */
.login-form input[type="text"],
.login-form input[type="password"]{
  width: 100%;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background-color: #0f1a1c;
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus{
  border-color: rgba(255,255,255,0.35);
}

/* Plain “good looking” button (baseline before sprites) */
.login-btn{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100px;
  width: 28%;
  height: 54px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 140, 110, 0.95);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.login-btn:hover{
  filter: brightness(1.05);
}

.login-btn:active{
  transform: translateX(-50%) scale(0.99);
}

/* ---------- Error Message ---------- */
.errorlist{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 60%;
  width: 35.75%;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  background: rgba(255, 0, 0, 0.85);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

/* ---------- Auth button (used in nav for logout) ---------- */
.auth-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(246, 194, 91, 0.55);

  background: linear-gradient(180deg, rgba(255,122,47,.96), rgba(246,194,91,.96));

  color: rgba(26,12,6,.95);
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-decoration: none;

  font-size: 13px;
  line-height: 1;

  cursor: pointer;

  box-shadow: 0 16px 34px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.auth-btn:hover{
  filter: brightness(1.06) saturate(1.05);
  box-shadow:
    0 18px 40px rgba(0,0,0,.52),
    0 0 0 4px rgba(24,184,176,.10),
    inset 0 1px 0 rgba(255,255,255,.28);
}

.auth-btn:active{ transform: scale(.97); }

/* Fixed-position variant so the button is visible above full-screen overlays
   (e.g., leaderboard/dashboard which use fixed, full-viewport layouts) */
.fixed-auth-form{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 99999; /* very high so it sits above overlays */
  transform: none; /* ensure JS left/top are not shifted */
  pointer-events: auto;

  /* Stack multiple auth buttons (logout + dashboard) */
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end; /* right-align buttons so their right edges match */
}

/* Left-side catalog wrapper (single button, right now) */
.fixed-left-catalog,
.fixed-left-rules {
  position: fixed;
  left: 14px;
  z-index: 99999;
  transform: none;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* rules button should sit below catalog if both are present; when catalog
   is absent it simply uses the top offset on its own */
.fixed-left-catalog { top: 14px; }
.fixed-left-rules { top: 64px; }

.auth-btn--fixed{
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
}

/* Variant if you want specialized left button spacing or smaller size */
.auth-btn--left{ }

@media (max-width: 640px){
  .fixed-left-catalog{ top:10px; left:10px }
  .fixed-left-rules{ top:50px; left:10px }
  .fixed-auth_form{ top:10px; right:10px }
  .fixed-auth-form{ top:10px; right:10px }
  .auth-btn--fixed{ height:34px; padding:0 12px; font-size:12px }
}

@media (max-width: 480px){
  .fixed-left-catalog{ top:10px; left:10px }
  .fixed-left-rules{ top:50px; left:10px }
  .fixed-auth-form{ top: 10px; right: 10px; }
  .auth-btn--fixed{ height: 34px; padding: 0 10px; font-size: 12px; }
}