/* Match the supplied login reference without changing account or game logic. */
:root {
  --account-page: oklch(95.5% 0 0);
  --account-surface: oklch(100% 0 0);
  --account-link: oklch(98% 0 0);
  --account-ink: oklch(0% 0 0);
  --account-placeholder: oklch(57% 0 0);
  --account-footer-muted: oklch(67% 0 0);
  --account-divider: oklch(88% 0 0);
  --account-blue: oklch(62% .215 255);
  --account-telegram: oklch(65% .13 235);
}
#root:has(.authfm) {
  font-family: Arial, sans-serif;
  color: var(--account-ink);
}
#root:has(.authfm) .bg-app-bg,
#root:has(.authfm) > .bg-muted {
  background: var(--account-page);
}
.authhd {
  height: 65px;
  padding: 0 16px !important;
  gap: 2px;
  font-size: 20px;
  background: var(--account-blue);
  color: var(--account-surface);
}
.authhd button { width: 24px; height: 28px; }
.authhd svg { width: 24px; height: 24px; }
.authfm { gap: 22px !important; }
.authfm > label {
  min-height: 63px;
  padding: 16px 21px !important;
  border-radius: 36px;
  gap: 0;
  font-size: 20px !important;
  background: var(--account-surface);
}
.authfm > label > svg { width: 16px; height: 16px; flex-shrink: 0; }
.authfm input { font-size: 20px; line-height: 28px; }
/* Keep the original OTP label size; disabled WAIT uses its native text-sm class. */
.authfm > label > button:not(:disabled) { font-size: 16px; }
.authfm input::placeholder { color: var(--account-placeholder); opacity: 1; }
.authfm .mob91 { display: inline; color: var(--account-placeholder); }
.authfm .mobin::placeholder { color: transparent; }
.authfm > div.-mt-1 { margin-top: -10px; }
.authfm > div.-mt-1 button {
  width: 256px;
  max-width: 65%;
  height: 46px;
  padding: 0;
  border-radius: 5px;
  font-size: 18px !important;
  background: var(--account-blue);
  color: var(--account-surface);
}
.authfm > div:last-child:not(.-mt-1) {
  margin-top: 3px;
  padding: 0 11.4%;
  justify-content: space-between;
}
.authfm > div:last-child a {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 14px !important;
  font-size: 18px !important;
  background: var(--account-link);
  color: var(--account-ink);
  border-color: var(--account-link);
}
#root nav.fixed.bottom-0 {
  height: calc(65px + env(safe-area-inset-bottom, 0px));
  padding: 10px 0 calc(5px + env(safe-area-inset-bottom, 0px));
  border-color: var(--account-divider);
  background: var(--account-surface);
  font-family: Arial, sans-serif;
}
#root nav.fixed.bottom-0 a { gap: 3px; font-size: 14px; line-height: 17px; }
#root nav.fixed.bottom-0 a.text-muted-foreground { color: var(--account-footer-muted); }
#root nav.fixed.bottom-0 a.text-brand { color: var(--account-blue); }
#root nav.fixed.bottom-0 svg { width: 28px; height: 28px; }
#root .fixed:has(> button[aria-label="Top"]) {
  bottom: calc(168px + env(safe-area-inset-bottom, 0px));
  right: max(0px, calc(50vw - 225px)) !important;
  padding: 8px 5px;
  gap: 9px;
  background: var(--account-surface);
  color: var(--account-placeholder);
}
#root .fixed:has(> button[aria-label="Top"]) > button { width: 30px; height: 30px; }
#root button[aria-label="Telegram"] { background: var(--account-telegram); opacity: 1; }

/* Recommendation field uniquely identifies registration, leaving login/reset intact. */
.authfm:has(input[placeholder="Recommendation Code"]) { gap: 21px !important; }
.authfm:has(input[placeholder="Recommendation Code"]) > label {
  min-height: 63px;
  height: 63px;
  padding: 0 21px !important;
}
.authfm:has(input[placeholder="Recommendation Code"]) > label:has(.mobin)::after {
  content: "+91";
  color: var(--account-placeholder);
  order: 1;
}
.authfm:has(input[placeholder="Recommendation Code"]) .mobin { order: 2; }
.authfm:has(input[placeholder="Recommendation Code"]) > label:not(:first-child) > svg {
  width: 21px;
  height: 21px;
}
.authfm:has(input[placeholder="Recommendation Code"]) > div:has(a[href$="/privacy"]) {
  height: 64px;
  padding: 0 19px;
  gap: 13px;
  font-size: 16px;
  background: var(--account-surface);
}
.authfm:has(input[placeholder="Recommendation Code"]) > div:has(a[href$="/privacy"]) > button {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 2px;
}
.authfm:has(input[placeholder="Recommendation Code"]) > div:has(a[href$="/privacy"]) > a {
  margin-left: 11px;
  color: var(--account-blue);
}
.authfm:has(input[placeholder="Recommendation Code"]) > div.-mt-1 { margin-top: -9px; }

/* Reset-only layout uses the existing New Password field as its scope. */
.authfm:has(input[placeholder="New Password"]) { gap: 22px !important; }
.authfm:has(input[placeholder="New Password"]) > label {
  height: 63px;
  min-height: 63px;
  padding: 0 21px !important;
}
.authfm:has(input[placeholder="New Password"]) > label:has(.mobin)::after {
  content: "+91";
  color: var(--account-placeholder);
  order: 1;
}
.authfm:has(input[placeholder="New Password"]) .mobin { order: 2; }
.authfm:has(input[placeholder="New Password"]) > label:not(:first-child) > svg {
  width: 21px;
  height: 21px;
}
.authfm:has(input[placeholder="New Password"]) > div.-mt-1 { margin-top: -1px; }
/* Reference feedback: centre grey toasts replace corner toasts on account pages. */
body:has(.authfm) [data-sonner-toaster] { display: none !important; }
.acc-toast {
  position: fixed; left: 50%; top: 50%; z-index: 10000;
  transform: translate(-50%, -50%); max-width: 80vw;
  padding: 8px 14px; border-radius: 4px; font: 12px/16px Arial, sans-serif;
  background: oklch(40% 0 0 / .9); color: var(--account-surface);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.acc-toast.on { opacity: 1; }
/* Reset Password keeps a blue WAIT countdown, as in the reference video. */
.authfm:has(input[placeholder="New Password"]) > label > button:disabled {
  background: var(--account-blue); color: var(--account-surface); box-shadow: none;
}
