/* Базовые настройки */

@font-face {
  font-family: "TildaSans";
  src: url("https://storage.yandexcloud.net/f-kit-assets/fonts/TildaSans-VF.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body,
button,
input {
  font-family:
    "TildaSans",
    -apple-system,
    BlinkMacSystemFont,
    Arial,
    sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #1a2d6c;
  color: #ffffff;
}

/* --- Контейнер и Стеклянная карточка (Авторизация) --- */
.custom-auth-box {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.custom-auth-box .auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.custom-auth-box .auth-card > *:first-child {
  margin-top: 0 !important;
}
.custom-auth-box .auth-card > *:last-child {
  margin-bottom: 0 !important;
}

/* --- Типографика --- */
.custom-auth-box .auth-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.custom-auth-box .auth-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
}

/* --- Поля ввода и плейсхолдеры --- */
.custom-auth-box input[type="email"],
.custom-auth-box input[type="password"],
.custom-auth-box input[type="text"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  font-size: 16px;
  color: #fff;
  outline: none;
}

.custom-auth-box input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* --- Чекбоксы --- */
.custom-auth-box .auth-legal-block {
  margin-top: 4px;
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-auth-box .legal-check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.custom-auth-box .legal-check input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: #fff993;
  flex-shrink: 0;
}

.custom-auth-box .legal-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
}

/* --- Кнопка --- */
.custom-auth-box .auth-btn {
  width: 100%;
  margin-bottom: 24px;
  background: #fff993;
  color: #0a192f;
  border: none;
  border-radius: 16px;
  padding: 18px 16px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- Ссылки и подсказки --- */
.custom-auth-box .login-legal-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
  margin-bottom: 24px;
}

.custom-auth-box a {
  color: #ffffff;
  text-decoration: underline;
}

.custom-auth-box .auth-toggle-box {
  font-size: 14px;
  margin-bottom: 0;
}

.custom-auth-box #auth-toggle-desc {
  color: rgba(255, 255, 255, 0.5);
}

.custom-auth-box #auth-toggle-link {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
  margin-left: 5px;
  padding-bottom: 2px;
}

.custom-auth-box .hidden {
  display: none !important;
}

/* =========================================
   🟢 ГЛОБАЛЬНЫЕ УВЕДОМЛЕНИЯ (FKitUI)
   ========================================= */

.message-box {
  position: fixed;
  top: -100px; /* Изначально спрятано за верхним краем экрана */
  left: 50%;
  transform: translateX(-50%);

  /* Внешний вид (Стиль Apple/Glassmorphism) */
  background: rgba(30, 30, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* Для поддержки Safari */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  /* Размеры и текст */
  padding: 14px 28px;
  border-radius: 100px; /* Сильное закругление как капсула */
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  max-width: 90%;
  word-wrap: break-word;

  /* Технические настройки */
  z-index: 999999; /* Всегда поверх всего остального */
  pointer-events: none; /* Чтобы уведомление не мешало кликать по кнопкам под ним */
  opacity: 0;

  /* Плавная пружинистая анимация */
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- СОСТОЯНИЕ: ПОКАЗАНО --- */
.message-box.show {
  top: 30px; /* Выезжает сверху на 30px */
  opacity: 1;
}

/* --- СОСТОЯНИЕ: ОШИБКА --- */
.message-box.error {
  background: rgba(50, 15, 15, 0.9);
  border: 1px solid rgba(255, 92, 92, 0.3);
  color: #ffcdd2;
}

/* Адаптация для телефонов (Пульты участников) */
@media (max-width: 600px) {
  .message-box.show {
    top: 20px;
  }
  .message-box {
    font-size: 14px;
    padding: 12px 24px;
  }
}
