/* =============================================================================
   LoonyAuth widget + modal styles. Self-contained: all classes are prefixed
   with `loony-auth-` and all colours are explicit, so this drops cleanly into
   any app regardless of its own theme.
   ============================================================================= */
.loony-auth-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  color: #96a8c0;
}

.loony-auth-row.loony-auth-floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9000;
  background: rgba(5, 9, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.loony-auth-text { white-space: nowrap; }
.loony-auth-text.is-in { color: #a6ff4d; text-shadow: 0 0 12px rgba(166, 255, 77, 0.5); }
.loony-auth-avatar {
  width: 30px;
  height: 30px;
  margin-inline-start: -8px;
  border: 1px solid rgba(166, 255, 77, 0.5);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(166, 255, 77, 0.25);
}
.loony-auth-avatar[hidden] { display: none; }

.loony-auth-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 14px;
  color: #050914;
  background: #00f5ff;
  font: inherit;
  font-weight: 850;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.35);
  transition: opacity 150ms ease;
}
.loony-auth-btn:hover { opacity: 0.85; }
.loony-auth-register {
  color: #fff;
  background: #ff3df2;
  box-shadow: 0 0 16px rgba(255, 61, 242, 0.3);
}

.loony-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.loony-auth-modal[hidden] { display: none; }

.loony-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.loony-auth-box {
  position: relative;
  width: min(380px, 100%);
  padding: 28px 26px;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 12px;
  background: #070c18;
  color: #f8fbff;
  box-shadow: 0 0 40px rgba(0, 245, 255, 0.18), 0 24px 70px rgba(0, 0, 0, 0.55);
}

.loony-auth-title {
  margin: 0 0 18px;
  font-size: 1.5rem;
  text-shadow: 0 0 16px rgba(0, 245, 255, 0.5);
}

.loony-auth-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 50%;
  color: #96a8c0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.loony-auth-close:hover { color: #f8fbff; border-color: #ff3df2; }

.loony-auth-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.loony-auth-tab {
  flex: 1;
  padding: 9px 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #96a8c0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.loony-auth-tab.is-active {
  color: #f8fbff;
  border-color: rgba(255, 61, 242, 0.5);
  background: rgba(255, 61, 242, 0.12);
}

.loony-auth-form { display: grid; gap: 10px; }

.loony-auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 8px;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
}
.loony-auth-input:focus {
  outline: none;
  border-color: #00f5ff;
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
}
.loony-auth-input[hidden] { display: none; }

.loony-auth-avatar-field {
  display: grid;
  gap: 7px;
  color: #96a8c0;
  font-size: 0.76rem;
  font-weight: 750;
}
.loony-auth-avatar-field[hidden] { display: none; }
.loony-auth-avatar-field small { color: #677991; font-weight: 600; }
.loony-auth-avatar-picker { display: flex; align-items: center; gap: 10px; }
.loony-auth-avatar-picker input[type="file"] { min-width: 0; max-width: 100%; color: #96a8c0; font-size: 0.72rem; }
.loony-auth-avatar-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 14px;
  object-fit: cover;
}
.loony-auth-avatar-preview[hidden] { display: none; }

.loony-auth-pw-wrap { position: relative; display: flex; }
.loony-auth-pw-wrap .loony-auth-input { padding-inline-end: 64px; }
.loony-auth-pw-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 10px;
  border: 1px solid rgba(109, 237, 255, 0.24);
  border-radius: 6px;
  color: #96a8c0;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.loony-auth-pw-toggle:hover { color: #00f5ff; border-color: #00f5ff; }

.loony-auth-error {
  margin: 0;
  min-height: 1.1em;
  color: #ff3df2;
  font-size: 0.82rem;
}

.loony-auth-submit {
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  color: #050914;
  background: #a6ff4d;
  font: inherit;
  font-weight: 850;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(166, 255, 77, 0.3);
}
.loony-auth-submit:hover { opacity: 0.88; }

.loony-auth-forgot {
  padding: 4px 0 0;
  border: none;
  background: transparent;
  color: #96a8c0;
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  justify-self: center;
}
.loony-auth-forgot:hover { color: #00f5ff; }

.loony-auth-settings-form { display: grid; gap: 13px; }
.loony-auth-account {
  margin: -2px 0 4px; padding: 11px;
  border: 1px solid rgba(166, 255, 77, .28); border-radius: 12px;
  background: linear-gradient(135deg, rgba(166, 255, 77, .11), rgba(0, 245, 255, .06));
}
.loony-auth-account-top { display:flex; justify-content:space-between; gap:10px; color:#dfffc1; font-size:.84rem; }
.loony-auth-account-top span { color:#a9c3dd; }
.loony-auth-account-keys { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.loony-auth-key { border:1px solid rgba(255,218,121,.42); border-radius:999px; padding:3px 7px; color:#ffe5a2; font-size:.7rem; }
.loony-auth-awards { display:grid; gap:5px; margin:9px 0 0; padding:0; list-style:none; max-height:104px; overflow:auto; }
.loony-auth-awards li { color:#dfeafa; font-size:.72rem; line-height:1.3; }
.loony-auth-awards li span { color:#baff75; }
.loony-auth-account-empty { color:#93a5bb !important; font-style:italic; }
.loony-auth-settings-form > label { display: grid; gap: 6px; color: #96a8c0; font-size: 0.78rem; font-weight: 750; }
.loony-auth-settings-avatar-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(109, 237, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.loony-auth-settings-avatar {
  width: 78px;
  height: 78px;
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: 20px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}
.loony-auth-settings-avatar[hidden] { display: block; visibility: hidden; }
.loony-auth-settings-avatar-row label { display: grid; gap: 7px; color: #96a8c0; font-size: 0.74rem; font-weight: 750; }
.loony-auth-settings-avatar-row input[type="file"] { max-width: 100%; color: #96a8c0; font-size: 0.68rem; }
.loony-auth-remove-avatar,
.loony-auth-settings-logout {
  border: 1px solid rgba(255, 61, 242, 0.3);
  border-radius: 7px;
  color: #ff9bf7;
  background: rgba(255, 61, 242, 0.07);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}
.loony-auth-remove-avatar { margin-top: 7px; padding: 6px 9px; }
.loony-auth-settings-logout { padding: 10px; }
.loony-auth-check { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.loony-auth-check input { width: 17px; height: 17px; accent-color: #00f5ff; }
