/* =========================
   AUTH UI (CLEAN + RESPONSIVE)
   Login / Signup / Verify
========================= */

/* ---------- THEME ---------- */
:root{
  --brand1:#ff3b7c;
  --brand2:#ff6a00;
  --grad: linear-gradient(135deg, var(--brand1), var(--brand2));

  --bg1:#1b1b2f;
  --bg2:#0a0a0a;

  --card: rgba(25,25,35,.96);
  --text:#ffffff;
  --muted:#b8b8b8;
  --field:#0f0f14;

  --radius:20px;
  --shadow: 0 22px 70px rgba(255, 59, 124, 0.22);
  --line: rgba(255,255,255,.10);
}

/* ---------- RESET ---------- */
*{ margin:0; padding:0; box-sizing:border-box; font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif; }
html,body{ max-width:100%; overflow-x:hidden; }
a{ text-decoration:none; color:inherit; }
button,input{ font-family:inherit; outline:none; }

/* Hide Google translate UI */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget,
.goog-te-gadget-icon{ display:none !important; }
body{ top:0 !important; }

/* ---------- PAGE WRAPPERS ---------- */
.login-page,
.verify-page{
  min-height:100vh;
  background: radial-gradient(circle at top, var(--bg1), var(--bg2));
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 22px;
  color: var(--text);
}

.signup-page{
  min-height:100vh;
  background: radial-gradient(circle at top, var(--bg1), #050505);
  color: var(--text);
  padding: 22px;
}

/* ---------- LAYOUT ---------- */
.signup-page .auth-container{
  width:100%;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 44px);
  display:grid;
  grid-template-columns: 1fr 460px;
  gap: 28px;
  align-items:center;
}

.signup-page .auth-left{
  position:relative;
  min-height: 520px;
}

/* ---------- ART (DESKTOP ONLY) ---------- */
.signup-page .shape{ position:absolute; }
.signup-page .triangle{
  width:150px;height:150px;background:#ffc107;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  top:12%; left:18%;
}
.signup-page .circle{
  width:130px;height:130px;border-radius:50%;
  background: var(--grad);
  top:34%; left:42%;
  filter: blur(.2px);
}
.signup-page .shield{
  width:180px;height:230px;border-radius: 0 0 90px 90px;
  background: var(--grad);
  bottom:10%; left:20%;
}
.signup-page .coin{
  width:92px;height:92px;border-radius:50%;
  background:#f5c542;
  top:52%; left:60%;
  display:flex;align-items:center;justify-content:center;
  color:#111;font-size:34px;font-weight:900;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}

/* ---------- CARD ---------- */
.login-card,
.auth-card,
.verify-card{
  width:100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.login-page .login-card{ max-width: 460px; padding: 34px 30px; }
.verify-page .verify-card{ max-width: 500px; padding: 34px 30px; }
.signup-page .auth-card{ padding: 32px 30px; }

/* ---------- TOP BAR (BACK + LANG) ---------- */
.auth-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.back-home{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(10,10,15,.25);
}
.back-home:hover{
  color:#fff;
  border-color: rgba(255,59,124,.45);
  background: rgba(255,59,124,.10);
}

/* ---------- LOGO AREA ---------- */
.logo{
  text-align:center;
  margin: 10px 0 18px;
}
.logo .auth-logo{
  max-width: 180px;
  max-height: 64px;
  object-fit: contain;
  display:inline-block;
}
.logo .auth-initials{
  display:inline-flex;
  width: 54px;height:54px;
  border-radius: 16px;
  align-items:center;justify-content:center;
  background: var(--grad);
  color:#fff;
  font-weight: 1000;
  margin-bottom: 10px;
}
.logo .auth-name{
  display:block;
  font-size: 24px;
  font-weight: 900;
  color: var(--brand1);
}

/* ---------- HEADINGS ---------- */
h2{
  text-align:center;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: .2px;
}
.subtitle{
  text-align:center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

/* ---------- FORM CONTROLS ---------- */
input{
  width:100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: var(--field);
  color:#fff;
  margin-bottom: 12px;
  min-height: 48px;
  font-size: 14px;
}
input::placeholder{ color: rgba(255,255,255,.55); }

input:focus{
  border-color: rgba(255,59,124,.55);
  box-shadow: 0 0 0 3px rgba(255, 59, 124, 0.18);
}

button{
  width:100%;
  padding: 14px;
  border-radius: 16px;
  border:none;
  background: var(--grad);
  color:#fff;
  font-weight: 900;
  cursor:pointer;
  min-height: 50px;
  transition: transform .15s ease, filter .15s ease;
}
button:hover{ transform: translateY(-1px); filter: brightness(1.03); }

/* ---------- REMEMBER + FORGOT ---------- */
.form-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 6px 0 16px;
  font-size: 13px;
  color: rgba(255,255,255,.72);
}

.form-options label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}

/* checkbox (does not inherit input styles) */
.form-options input[type="checkbox"]{
  all: unset;
  appearance:none;
  -webkit-appearance:none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brand1);
  border-radius: 4px;
  display:inline-block;
  position:relative;
  cursor:pointer;
}
.form-options input[type="checkbox"]:checked{
  background: var(--brand1);
}
.form-options input[type="checkbox"]:checked::after{
  content:"✓";
  position:absolute;
  left:3px;
  top:-1px;
  font-size:12px;
  color:#fff;
}

.forgot-link{
  color: rgba(255,255,255,.78);
  font-weight: 800;
}
.forgot-link:hover{ color: var(--brand1); }

/* ---------- PASSWORD TOGGLE ---------- */
.password-group{ position:relative; }
.password-group input{ padding-right: 50px; }

.password-toggle{
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color: #9aa0a6;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.password-toggle:hover{
  border-color: rgba(255,59,124,.35);
  background: rgba(255,59,124,.10);
}
.password-toggle svg{ width:18px; height:18px; }

/* ---------- ALERTS ---------- */
.error-box,.alert-error,.alert-success,.success-box,.info-box{
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  margin: 12px 0 16px;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.alert-success,.success-box{
  border-color: rgba(0, 255, 170, .20);
  background: rgba(0, 255, 170, .08);
}

/* ---------- FOOTERS ---------- */
.register-text,
.auth-footer,
.note{
  margin-top: 16px;
  text-align:center;
  font-size: 13px;
  color: rgba(255,255,255,.65);
}
.register-text a,
.auth-footer a{
  color: var(--brand1);
  font-weight: 900;
}

/* ---------- LANGUAGE DROPDOWN ---------- */
.auth-lang{ position:relative; z-index:200; }

.lang-trigger{
  height: 40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,15,.35);
  color:#fff;
  cursor:pointer;
  font-weight: 900;
  font-size: 12.5px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.lang-trigger:hover{
  border-color: rgba(255,59,124,.45);
  background: rgba(255,59,124,.10);
}

.lang-menu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 40px));
  max-height: min(360px, 55vh);
  overflow:auto;
  padding: 10px;
  border-radius: 16px;
  background: rgba(25,25,35,.98);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  display:none;
}
#langDD.open .lang-menu{ display:block; }

.lang-menu button{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,10,15,.35);
  color:#fff;
  cursor:pointer;
  font-weight: 800;
  font-size: 13px;
  min-height: 44px;
}
.lang-menu button:hover{
  border-color: rgba(255,59,124,.35);
  background: rgba(255,59,124,.12);
}

/* ---------- RESPONSIVE ---------- */

/* Tablet & below: hide left art, keep centered card */
@media (max-width: 900px){
  .signup-page .auth-container{
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 560px;
    padding: 6px 0;
  }
  .signup-page .auth-left{ display:none !important; }
}

/* Phones: bigger controls, full-width card, no tiny look */
@media (max-width: 600px){
  .login-page, .signup-page, .verify-page{
    padding: 16px;
    align-items:flex-start;
  }

  .login-page .login-card,
  .signup-page .auth-card,
  .verify-page .verify-card{
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 18px;
  }

  h2{ font-size: 22px; }
  .subtitle{ font-size: 14px; margin-bottom: 16px; }

  input{
    font-size: 16px;
    min-height: 54px;
    border-radius: 14px;
  }

  button{
    min-height: 54px;
    border-radius: 16px;
    font-size: 15px;
  }

  /* language becomes sheet */
  .lang-menu{
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 52vh;
    z-index: 9999;
  }

  .auth-head{ flex-wrap:wrap; gap:10px; }
}

/* Very small phones */
@media (max-width: 380px){
  .login-page .login-card,
  .signup-page .auth-card,
  .verify-page .verify-card{
    padding: 20px 14px;
  }
  h2{ font-size: 20px; }
}


/* =========================
   ✅ HARD MOBILE + TRANSLATOR FIX
   Put this at the VERY BOTTOM of your CSS
========================= */

/* Ensure page never shrinks weird */
html, body { width: 100%; }

/* Make auth pages behave like proper mobile layout */
@media (max-width: 768px){

  /* stop centering that squeezes cards */
  .login-page,
  .signup-page,
  .verify-page{
    display: block !important;
    padding: 16px !important;
  }

  /* Force card full width */
  .login-card,
  .auth-card,
  .verify-card{
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px auto !important;
  }

  /* Signup: kill left side no matter what */
  .signup-page .auth-left,
  .signup-page .shape,
  .signup-page .triangle,
  .signup-page .circle,
  .signup-page .shield,
  .signup-page .coin{
    display: none !important;
  }

  /* Signup container becomes single column */
  .signup-page .auth-container{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
  }

  /* Bigger form controls on phones */
  input{
    font-size: 16px !important;
    min-height: 54px !important;
    padding: 16px 14px !important;
  }
  button{
    min-height: 54px !important;
    font-size: 15px !important;
    padding: 16px 14px !important;
  }

  /* ✅ Translator button alignment fix */
  .auth-head{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .back-home{
    flex: 1 1 auto !important;
    width: auto !important;
    white-space: nowrap !important;
  }

  .auth-lang{
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  .lang-trigger{
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
  }

  /* ✅ dropdown becomes sheet so it doesn't overflow */
  .lang-menu{
    position: fixed !important;
    top: 78px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-height: 55vh !important;
    z-index: 99999 !important;
  }
}

/* Extra small phones */
@media (max-width: 420px) {

 .auth-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;
  width:100%;
}

/* keep back button tight */
.auth-top .back-home{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

/* push translator to the far right */
.auth-top .auth-lang{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
}

/* keep the trigger inline-flex too */
.auth-top .lang-trigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
}

/* ✅ Mobile: if space is tight, allow wrapping nicely */
@media (max-width: 420px){
  .auth-top{
    flex-wrap:wrap;
  }
  .auth-top .auth-lang{
    width:100%;
    justify-content:flex-end;
  }
}