/* Extracted from index.html. Login/register gate and auth-required page masking styles. */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: none;
  align-items: center;
  justify-content: center;
  background: #F0EEE9;
  padding: 18px;
}

.auth-gate.show {
  display: flex;
}

.auth-gate-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("/assets/images/auth-bg.jpg") center / cover no-repeat;
  animation: auth-bg-zoom 84s ease-in-out infinite;
}

@keyframes auth-bg-zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.auth-gate-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  max-height: 44px;
  max-width: 160px;
  pointer-events: none;
}

.auth-gate-logo img {
  display: block;
  max-height: 44px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.auth-gate-welcome {
  width: 100%;
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-gate-center {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: -50px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html.theme-dark .auth-card {
  background: #202020;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.auth-gate .auth-card,
html.theme-dark .auth-gate .auth-card {
  background: rgba(255, 248, 240, 0.32) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 235, 215, 0.45) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22) !important;
}
.auth-gate .auth-title,
html.theme-dark .auth-gate .auth-title { color: #1d1d1f !important; }
.auth-gate .auth-tab-btn,
html.theme-dark .auth-gate .auth-tab-btn {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #3a3a3c !important;
}
.auth-gate .auth-tab-btn.active,
html.theme-dark .auth-gate .auth-tab-btn.active {
  background: #F0EEE9 !important;
  border-color: rgba(29, 29, 31, 0.18) !important;
  color: #1d1d1f !important;
}
.auth-gate .auth-input,
html.theme-dark .auth-gate .auth-input {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #1d1d1f !important;
}
.auth-gate .auth-submit-btn,
html.theme-dark .auth-gate .auth-submit-btn {
  background: #F0EEE9 !important;
  color: #1d1d1f !important;
}
.auth-gate .auth-check,
html.theme-dark .auth-gate .auth-check { color: rgba(29, 29, 31, 0.72) !important; }
.auth-gate .auth-link-btn,
html.theme-dark .auth-gate .auth-link-btn { color: #0071e3 !important; }
.auth-gate .auth-note,
html.theme-dark .auth-gate .auth-note { color: rgba(29, 29, 31, 0.6) !important; text-align: right !important; }
.auth-gate .auth-input::placeholder,
html.theme-dark .auth-gate .auth-input::placeholder { color: rgba(60, 60, 67, 0.5) !important; }

.auth-gate.auth-restoring .auth-login-form,
.auth-gate.auth-restoring #auth-login-form,
.auth-gate.auth-restoring #auth-forgot-form,
.auth-gate.auth-restoring .auth-inline-row,
.auth-gate.auth-restoring .auth-submit-btn {
  display: none !important;
}

.auth-gate.auth-restoring .auth-card {
  align-items: center;
  min-height: 112px;
  justify-content: center;
  text-align: center;
}

.auth-gate.auth-restoring .auth-note,
html.theme-dark .auth-gate.auth-restoring .auth-note {
  text-align: center !important;
}

.auth-title {
  margin: 0;
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 600;
}

.auth-tabs {
  display: flex;
  gap: 8px;
}

.auth-tab-btn {
  flex: 1;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #3a3a3c;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.auth-tab-btn.active {
  background: #F0EEE9;
  border-color: rgba(29, 29, 31, 0.18);
  color: #1d1d1f;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form.hidden {
  display: none;
}

.auth-input {
  height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0 11px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 13px;
}

.auth-submit-btn {
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #1d1d1f;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.auth-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 26px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(29, 29, 31, 0.72);
  font-size: 12px;
  user-select: none;
}

.auth-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--blue);
}

.auth-link-btn {
  border: 0;
  background: transparent;
  color: #0071e3;
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.auth-note {
  margin: 0;
  color: rgba(29, 29, 31, 0.6);
  font-size: 12px;
  line-height: 1.5;
}

body.auth-required .container,
body.auth-required .left-float-bar,
body.auth-required .top-nav,
body.auth-required .ai-back-to-top-btn,
body.auth-required .shortcut-help-dock,
body.auth-required .ai-speed-broadcast {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
