/* ================= GLOBAL ================= */
: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:#aaaaaa;
  --field:#111;
  --radius:20px;
  --shadow: 0 25px 80px rgba(255, 59, 124, 0.25);
}

*{
  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; }
input,button{ outline:none; font-family:inherit; }

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

/* ================= COMMON CARD ================= */
.login-card,
.auth-card,
.verify-card{
  width:100%;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ================= AUTH 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: 20px;
  color: var(--text);
}

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

/* ================= LOGIN CARD ================= */
.login-page .login-card{
  max-width: 420px;                 /* ✅ slightly wider on desktop */
  padding: 34px 30px;
  position: relative;
}

/* ================= SIGNUP LAYOUT ================= */
.signup-page .auth-container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 40px);
}

.signup-page .auth-left{
  position:relative;
  width: 45%;
  min-height: 420px;
}

.signup-page .auth-card{
  max-width: 440px;
  padding: 30px;
  position: relative;
}

/* Decorations (keep yours) */
.signup-page .shape{ position:absolute; }
.signup-page .triangle{
  width:140px;height:140px;background:#ffc107;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  top:15%; left:20%;
}
.signup-page .circle{
  width:120px;height:120px;border-radius:50%;
  background: var(--grad);
  top:35%; left:45%;
}
.signup-page .shield{
  width:160px;height:200px;border-radius: 0 0 80px 80px;
  background: var(--grad);
  bottom:15%; left:25%;
}
.signup-page .coin{
  position:absolute;
  width:90px;height:90px;border-radius:50%;
  background:#f5c542;
  top:50%; left:60%;
  display:flex;align-items:center;justify-content:center;
  color:#000;font-size:32px;font-weight:900;
}

/* ================= VERIFY CARD ================= */
.verify-page .verify-card{
  max-width: 460px;
  padding: 34px 30px;
  position: relative;
}

/* ================= AUTH HEADER (Back + Lang) ================= */
.auth-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 16px;
}

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

/* ================= BRAND / LOGO ================= */
.logo{
  text-align:center;
  margin: 8px 0 18px;
}

.logo .auth-logo{
  max-width: 180px;
  max-height: 64px;
  object-fit: contain;
  display:inline-block;
}

.logo .auth-name{
  display:block;
  font-size: 24px;
  font-weight: 900;
  color: var(--brand1);
}
.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;
}

/* ================= HEADINGS ================= */
h2{
  text-align:center;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 900;
}

.subtitle{
  text-align:center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ================= INPUTS / BUTTONS ================= */
input{
  width:100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--field);
  color:#fff;
  margin-bottom: 12px;
  min-height: 46px;                 /* ✅ touch */
  font-size: 14px;
}

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

input:focus{
  border-color: rgba(255,59,124,.45);
  box-shadow: 0 0 0 2px rgba(255, 59, 124, 0.35);
}

button{
  width:100%;
  padding: 14px;
  border-radius: 14px;
  border:none;
  background: var(--grad);
  color:#fff;
  font-weight: 900;
  cursor:pointer;
  min-height: 46px;                 /* ✅ touch */
  transition: transform .15s ease, filter .15s ease;
}

button:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}

/* ================= FORM OPTIONS (remember + forgot) ================= */
.form-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 6px 0 18px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}

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

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

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

/* ================= 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: 800;
}

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

.password-toggle{
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor:pointer;
  color: #9aa0a6;
  display:flex;
  align-items:center;
  justify-content:center;
  width: 28px;
  height: 28px;
  user-select:none;
}
.password-toggle svg{ width:18px; height:18px; display:block; }

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

/* =========================
   AUTH TRANSLATE — RESPONSIVE
========================= */
.auth-lang{
  position: relative;             /* sits inside .auth-head */
  z-index: 200;
}

/* trigger */
.lang-trigger{
  height: 40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  padding: 0 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,10,15,.35);

  color:#fff;
  cursor:pointer;
  font-weight: 800;
  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);
}

/* dropdown menu */
.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: 14px;

  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: 12px;

  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,10,15,.35);
  color:#fff;

  cursor:pointer;
  font-weight: 700;
  font-size: 13px;
  min-height: 44px;               /* ✅ tap */
}
.lang-menu button:hover{
  border-color: rgba(255,59,124,.35);
  background: rgba(255,59,124,.12);
}

/* scrollbar (optional) */
.lang-menu::-webkit-scrollbar{ width: 8px; }
.lang-menu::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}
.lang-menu::-webkit-scrollbar-track{ background: transparent; }

/* ================= RESPONSIVE ================= */

/* Tablets */
@media (max-width: 900px){
  .signup-page .auth-container{
    flex-direction: column;
    justify-content: center;
  }
  .signup-page .auth-left{ display:none; }

  .signup-page .auth-card{
    width: 100%;
    max-width: 520px; /* ✅ more breathing room on tablets */
  }
}

/* Phones */
@media (max-width: 520px){
  .login-page, .signup-page, .verify-page{ padding: 14px; }

  .login-page .login-card,
  .signup-page .auth-card,
  .verify-page .verify-card{
    padding: 24px 18px;
  }

  /* Make header wrap nicely */
  .auth-head{
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* ✅ menu becomes fixed sheet so it never cuts off */
  .lang-menu{
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 50vh;
    border-radius: 16px;
    z-index: 9999;
  }
}

/* Very small */
@media (max-width: 360px){
  h2{ font-size: 18px; }
  .lang-trigger{ padding: 0 10px; font-size: 12px; }
}
/* =========================
   AUTH TOP BAR (BACK + LANG)
========================= */
.auth-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

/* back home button */
.back-home{
  display:inline-flex;              /* ✅ flex as requested */
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:12px;
  font-size:13px;
  color:rgba(255,255,255,.75);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10,10,15,.25);
}

.back-home:hover{
  color:#fff;
  border-color: rgba(255,59,124,.45);
  background: rgba(255,59,124,.10);
}

/* translator container */
.auth-lang{
  position:relative;                /* NOT absolute anymore */
  top:auto;
  right:auto;
}

/* mobile handling */
@media (max-width:480px){
  .auth-top{
    flex-wrap:wrap;                 /* stack nicely if tight */
  }

  .auth-lang{
    margin-left:auto;               /* keeps it right-aligned */
  }
}

/* ================= CHECKBOX (PREVIOUS STYLE) ================= */
.login-page .form-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
  font-size:13px;
  color:#bbb;
}

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

/* reset checkbox */
.login-page .form-options input[type="checkbox"]{
  appearance:none;
  width:16px;
  height:16px;
  margin:0;
  padding:0;
  border:2px solid #ff3b7c;
  border-radius:4px;
  background:transparent;
  cursor:pointer;
  position:relative;
}

/* checked state */
.login-page .form-options input[type="checkbox"]:checked{
  background:#ff3b7c;
}

/* checkmark */
.login-page .form-options input[type="checkbox"]:checked::after{
  content:"✓";
  position:absolute;
  color:#fff;
  font-size:12px;
  left:3px;
  top:-1px;
}
/* ✅ FIX CHECKBOX HEIGHT ALIGNMENT */
.login-page .form-options label{
  align-items: center;      /* ensure vertical centering */
}

.login-page .form-options input[type="checkbox"]{
  position: relative;
  top: -1px;                /* 🔑 subtle vertical nudge */
}
.login-page .form-options label{
  display:flex;
  align-items:center;
  line-height:1;            /* normalize height */
}

/* ✅ HARD FIX: checkbox inherits global input min-height/line-height */
.login-page .form-options input[type="checkbox"]{
  all: unset;                 /* wipe global input styles */
  appearance: none;
  -webkit-appearance: none;

  width: 16px;
  height: 16px;

  border: 2px solid #ff3b7c;
  border-radius: 4px;
  background: transparent;

  display: inline-block;      /* prevents baseline weirdness */
  vertical-align: middle;     /* prevents dropping */
  flex: 0 0 16px;

  position: relative;
  top: 0;                     /* remove nudge */
  cursor: pointer;
}

.login-page .form-options input[type="checkbox"]:checked{
  background: #ff3b7c;
}

.login-page .form-options input[type="checkbox"]:checked::after{
  content: "✓";
  position: absolute;
  left: 3px;
  top: -1px;
  font-size: 12px;
  color: #fff;
}

/* ✅ make text & checkbox share same vertical rhythm */
.login-page .form-options label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 16px;          /* match checkbox height */
}

/* field error text */
.field-error{
  margin: -6px 0 10px;
  font-size: 12px;
  color: #ff8fb0;
  line-height: 1.3;
}
.is-invalid{
  border-color: rgba(255, 59, 124, .70) !important;
  box-shadow: 0 0 0 2px rgba(255, 59, 124, .18) !important;
}

