/* PlieraTech — EclipseID auth page */

body.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Фоновая картинка */
body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../banner.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(.55) contrast(1.05) blur(8px);
  transform: scale(1.04);
  z-index: 0;
  pointer-events: none;
}

/* Затемнение поверх */
body.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 14, 18, .55), rgba(14, 14, 18, .88)),
    radial-gradient(50% 50% at 50% 30%, rgba(142, 240, 168, .08), transparent 70%);
  z-index: 1;
  pointer-events: none;
}

body.auth-page > * {
  position: relative;
  z-index: 2;
}

/* Обёртка */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* Карточка */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 40px 32px 28px;
  background: rgba(22, 22, 28, .78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  text-align: center;
}

/* Градиентный ободок */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(142, 240, 168, .45), transparent 60%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.auth-logo {
  width: 128px;
  height: 128px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 14px rgba(142, 240, 168, .35));
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 8px;
  color: var(--fg);
}
.auth-sub {
  font-size: 14px;
  color: var(--fg-2);
  margin: 0 0 26px;
  line-height: 1.55;
}

/* Discord */
.btn-discord {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  background: #5865F2;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .18s;
  box-shadow: 0 12px 32px rgba(88, 101, 242, .35);
  text-decoration: none;
}
.btn-discord:hover:not(:disabled) {
  background: #4752C4;
  transform: translateY(-1px);
  color: #fff;
}
.btn-discord:disabled {
  background: var(--card-2);
  color: var(--fg-3);
  box-shadow: none;
  filter: grayscale(.6);
  cursor: not-allowed;
  transform: none;
}
.btn-discord svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Checkbox */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 18px;
  text-align: left;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auth-check-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid var(--border-2);
  background: var(--card-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .18s;
  margin-top: 1px;
}
.auth-check-box::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #0b0b0f;
  border-bottom: 2px solid #0b0b0f;
  transform: rotate(-45deg) scale(0);
  transition: transform .18s;
  margin-top: -3px;
}
.auth-check input:checked + .auth-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.auth-check input:checked + .auth-check-box::after {
  transform: rotate(-45deg) scale(1);
}
.auth-check a {
  color: var(--accent);
  border-bottom: 1px solid rgba(142, 240, 168, .35);
}
.auth-check a:hover {
  border-bottom-color: var(--accent);
}

/* Футер внутри карточки */
.auth-foot {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* Сообщение об ошибке */
.auth-error {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 107, 107, .08);
  border: 1px solid rgba(255, 107, 107, .25);
  color: #ff8f8f;
  font-size: 13px;
  text-align: left;
  display: none;
}
.auth-error.show { display: block; }

/* Callback: спиннер */
.auth-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}
.auth-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--card-2);
  border-top-color: var(--accent);
  animation: auth-spin .8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-status-text {
  color: var(--fg-2);
  font-size: 14px;
}

/* Адаптив */
@media (max-width: 640px) {
  body.auth-page::before { filter: brightness(.42) contrast(1.05) blur(8px); }
  body.auth-page::after {
    background:
      linear-gradient(180deg, rgba(14, 14, 18, .65), rgba(14, 14, 18, .92)),
      radial-gradient(50% 50% at 50% 30%, rgba(142, 240, 168, .06), transparent 70%);
  }
  .auth-card {
    padding: 32px 22px 24px;
    border-radius: var(--r-lg);
  }
  .auth-title { font-size: 20px; }
}