/* css/login.css — экран логина VlessOne.
   Язык: фото-фон (Севастополь) + frosted-glass карта, violet-бренд, gold-акцент.
   Тон: лаконично / дорого / понятно / эргономично.
   Переиспользует :root из index.html (--glass/--brand/--gold/--line/...). */

.vo-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 32px max(18px, env(safe-area-inset-right)) 44px max(18px, env(safe-area-inset-left));
}
/* мягкий скрим под картой — читаемость поверх яркого заката, фото не трогаем */
.vo-login::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 38%, rgba(14, 8, 26, 0.55) 0%, rgba(14, 8, 26, 0.15) 46%, transparent 72%),
    linear-gradient(180deg, rgba(10, 6, 20, 0.34) 0%, transparent 30%, transparent 64%, rgba(10, 6, 20, 0.42) 100%);
}
.vo-login-inner {
  position: relative;
  width: 100%;
  max-width: 392px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── шапка / лого ── */
.vo-login-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  margin-bottom: 2px;
}
.vo-login-logo {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 19px;
  background: var(--brand-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 30px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
/* мягкое гало бренда под лого */
.vo-login-logo::after {
  content: '';
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.5), transparent 78%);
  filter: blur(8px);
}
.vo-login-logo span {
  font-family: 'Russo One', sans-serif;
  font-size: 27px;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.vo-login-title {
  font-family: 'Russo One', sans-serif;
  font-size: 23px;
  letter-spacing: 0.03em;
  background: linear-gradient(92deg, #fff 0%, var(--brand-hi) 70%, var(--gold-hi) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── glass-карточка (signature: luminous верхний кант) ── */
.vo-login-card {
  position: relative;
  overflow: hidden;
  background: rgba(19, 11, 34, 0.46);
  border: 1px solid rgba(212, 192, 255, 0.16);
  border-radius: var(--r-card);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow:
    0 30px 80px -24px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vo-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 192, 255, 0.6), rgba(255, 217, 138, 0.4), transparent);
}

/* ── баннер реферала ── */
.vo-login-banner {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-hi);
  background: rgba(255, 184, 77, 0.12);
  border: 1px solid rgba(255, 184, 77, 0.28);
  border-radius: 14px;
  padding: 11px 13px;
}

/* ── алерт ошибки ── */
.vo-login-alert {
  font-size: 13px;
  line-height: 1.45;
  color: #ffd0d0;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 12px;
  padding: 11px 13px;
}
.vo-err-text {
  font-size: 13px;
  color: var(--danger);
}

/* ── заголовки/тексты внутри карты ── */
.vo-login-h {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.01em;
}
.vo-login-p {
  font-size: 13.5px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.55;
}
.vo-login-email {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-hi);
  text-align: center;
  word-break: break-all;
}
.vo-hint {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.55;
}
.vo-login-icon {
  width: 58px;
  height: 58px;
  margin: 4px auto 0;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
}
.vo-login-icon.vo-ok {
  background: rgba(52, 211, 153, 0.16);
  color: var(--ok);
}
.vo-login-icon.vo-bad {
  background: rgba(248, 113, 113, 0.16);
  color: var(--danger);
}

/* ── разделитель ── */
.vo-divider {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vo-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
}
.vo-divider-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ── табы логин/регистрация ── */
.vo-tabs {
  display: flex;
  gap: 4px;
  background: rgba(24, 14, 42, 0.34);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 4px;
}
.vo-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  min-height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.vo-tab.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 4px 14px -2px rgba(139, 92, 246, 0.5);
}

/* ── форма + поля ── */
.vo-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.vo-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vo-label-text {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.vo-field {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* 16px = без авто-зума iOS */
  color: var(--text);
  background: rgba(24, 14, 42, 0.4);
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 46px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.vo-field::placeholder {
  color: var(--text-faint);
}
.vo-field:focus {
  border-color: var(--brand-hi);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

/* ── кнопки ── */
.vo-btn {
  position: relative;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 13px;
  min-height: 48px;
  padding: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s, filter 0.16s, opacity 0.16s, box-shadow 0.16s;
}
.vo-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.vo-btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow:
    0 12px 28px -8px rgba(139, 92, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
@media (hover: hover) {
  .vo-btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
      0 16px 34px -8px rgba(139, 92, 246, 0.7),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  .vo-oauth-btn:hover,
  .vo-tab:not(.active):hover {
    border-color: var(--line-bright);
    color: var(--text);
  }
}
.vo-btn-primary:not(:disabled):active {
  transform: translateY(0);
  filter: brightness(1.1);
}
.vo-btn-secondary {
  background: rgba(24, 14, 42, 0.4);
  border: 1px solid var(--line-bright);
  color: var(--text);
}

/* ── ссылка-кнопка ── */
.vo-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-hi);
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: none;
  transition: opacity 0.16s;
}
.vo-link:hover {
  opacity: 0.8;
}
.vo-center {
  text-align: center;
}
.vo-center-block {
  display: block;
  margin: 0 auto;
}

/* ── OAuth-кнопки ── */
.vo-oauth-row {
  display: flex;
  gap: 9px;
}
.vo-oauth-btn {
  flex: 1;
  font-family: inherit;
  background: rgba(24, 14, 42, 0.4);
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 46px;
  padding: 10px 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.vo-oauth-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Telegram-виджет слот ── */
.vo-tg-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.vo-tg-fallback {
  font-size: 12px;
}

/* ── спиннер ── */
.vo-spin {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: vo-spin 0.8s linear infinite;
}
@keyframes vo-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .vo-spin { animation-duration: 1.6s; }
  .vo-btn-primary:not(:disabled):hover { transform: none; }
}
