/* ============================================ */
/*  АВТОРИЗАЦИЯ — в стиле игры (фиолетово-розовый неон) */
/* ============================================ */

:root {
  --auth-violet: #b88be3;
  --auth-pink:   #ff5fa8;
  --auth-glow:   rgba(220, 130, 230, 0.55);
}

/* === Хедер с информацией об игроке === */
.user-header {
  position: fixed;
  top: 24px; left: 28px;
  display: flex; align-items: center; gap: 14px;
  z-index: 30;
}

.user-info {
  display: none;
  align-items: center; gap: 14px;
  background: linear-gradient(180deg, rgba(40, 24, 60, 0.85), rgba(20, 12, 30, 0.85));
  border: 1px solid rgba(200, 140, 255, 0.4);
  padding: 8px 16px;
  font-family: 'Cinzel', serif;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 14px rgba(160, 100, 230, 0.12);
  border-radius: 3px;
}
.user-info.show { display: flex; }

.user-info .uname {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #f0e0ff;
  text-shadow: 0 0 8px rgba(220, 180, 255, 0.4);
  text-transform: uppercase;
}
.user-info .uname::before {
  content: "@";
  color: rgba(220, 180, 255, 0.5);
  margin-right: 1px;
}
.user-info .ulevel {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #ff5fa8;
  padding: 3px 10px;
  border: 1px solid rgba(255, 95, 168, 0.5);
  background: rgba(0,0,0,0.4);
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 95, 168, 0.4);
  border-radius: 2px;
}
.user-info .logout {
  width: 92px; height: 30px;
  padding: 0; border: none; background: transparent;
  background-image: url('../img/auth_btn/btn_logout.png?v=1');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  font-size: 0; color: transparent;
  cursor: pointer;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.user-info .logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.2) drop-shadow(0 0 10px var(--auth-glow));
}

/* === Кнопка SIGN IN в хедере — каменная плита === */
.signin {
  position: fixed; top: 22px; right: 28px;
  height: 50px; width: 150px;
  padding: 0; border: none; background: transparent;
  background-image: url('../img/auth_btn/btn_signin.png?v=1');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  font-size: 0; color: transparent;
  cursor: pointer; z-index: 10;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.6));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.signin:hover {
  transform: translateY(-2px);
  filter: brightness(1.2) drop-shadow(0 0 14px var(--auth-glow));
}

.version {
  position: fixed; bottom: 16px; right: 24px;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.3em;
  color: rgba(200, 140, 255, 0.45); z-index: 5;
}

/* === Модалка авторизации === */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 3, 10, 0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s ease;
}

.auth-box {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120,60,180,0.25), transparent 60%),
    linear-gradient(180deg, rgba(34,20,52,0.98), rgba(15,8,22,0.98));
  border: 1.5px solid rgba(200, 140, 255, 0.5);
  border-radius: 8px;
  width: 100%; max-width: 430px;
  padding: 40px 44px 32px;
  position: relative;
  box-shadow:
    0 16px 56px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(220,180,255,0.1),
    0 0 40px rgba(160, 80, 255, 0.18);
}
/* "огоньки" по углам */
.auth-box::before, .auth-box::after,
.auth-box .corner-bl, .auth-box .corner-br {
  content: ""; position: absolute;
  width: 8px; height: 8px;
  background: radial-gradient(circle, #ffd0f0 0%, var(--auth-pink) 45%, var(--auth-violet) 100%);
  border-radius: 50%;
  box-shadow: 0 0 7px var(--auth-glow);
}
.auth-box::before { top: 12px; left: 14px; }
.auth-box::after  { top: 12px; right: 14px; }
.auth-box .corner-bl { bottom: 12px; left: 14px; }
.auth-box .corner-br { bottom: 12px; right: 14px; }

.auth-close {
  position: absolute; top: 8px; right: 38px;
  background: transparent; border: none;
  color: rgba(220, 180, 255, 0.6);
  font-family: 'Cinzel', serif;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.auth-close:hover { color: #fff; text-shadow: 0 0 10px var(--auth-pink); }

.auth-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.3em;
  text-align: center;
  background: linear-gradient(180deg, #f0d0ff, #b88be3 60%, #ff5fa8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(200, 120, 240, 0.4));
  margin-bottom: 22px;
  text-transform: uppercase;
}

/* === Вкладки — каменные плиты === */
.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  height: 52px;
  background: transparent;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  border: none;
  font-size: 0; color: transparent;
  cursor: pointer;
  opacity: 0.42;
  filter: grayscale(0.5) brightness(0.8);
  transition: all 0.22s ease;
}
.auth-tab[data-action="auth-tab-login"]    { background-image: url('../img/auth_btn/btn_signin.png?v=1'); }
.auth-tab[data-action="auth-tab-register"] { background-image: url('../img/auth_btn/btn_register.png?v=1'); }
.auth-tab:hover { opacity: 0.8; filter: grayscale(0) brightness(1); }
.auth-tab.active {
  opacity: 1;
  filter: grayscale(0) brightness(1.12) drop-shadow(0 0 12px var(--auth-glow));
  transform: translateY(-1px);
}

/* Поля */
.auth-field {
  display: block; margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 0.3em;
  color: rgba(220, 180, 255, 0.85);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.auth-field input {
  width: 100%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(200, 140, 255, 0.35);
  border-radius: 4px;
  color: #f0e4ff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  padding: 11px 14px;
  letter-spacing: 0.05em;
  outline: none;
  transition: all 0.2s ease;
}
.auth-field input:focus {
  border-color: var(--auth-pink);
  box-shadow: 0 0 14px rgba(255, 95, 168, 0.22);
  background: rgba(0,0,0,0.6);
}
.auth-field input::placeholder { color: rgba(200, 160, 240, 0.45); font-style: italic; }
.auth-field .hint {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 11px;
  color: rgba(200, 160, 240, 0.5);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* Сообщение об ошибке */
.auth-message {
  min-height: 18px;
  margin-bottom: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.05em;
  text-align: center;
}
.auth-message.error   { color: #ff8060; }
.auth-message.success { color: #5ad06f; }
.auth-message.info    { color: rgba(220, 180, 255, 0.7); }

/* === Кнопка submit — каменная плита (меняется по режиму) === */
.auth-submit {
  display: block;
  width: 100%;
  height: 64px;
  padding: 0; border: none; background: transparent;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  background-image: url('../img/auth_btn/btn_signin.png?v=1');
  font-size: 0; color: transparent;
  cursor: pointer;
  margin: 6px 0 12px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.auth-submit.mode-register { background-image: url('../img/auth_btn/btn_create.png?v=1'); }
.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.18) drop-shadow(0 0 16px var(--auth-glow));
}
.auth-submit:disabled { cursor: wait; }
.auth-submit.loading { animation: auth-pulse 0.9s ease-in-out infinite; }
@keyframes auth-pulse {
  0%, 100% { filter: brightness(0.7) drop-shadow(0 0 6px var(--auth-glow)); }
  50%      { filter: brightness(1.1) drop-shadow(0 0 18px var(--auth-glow)); }
}

/* Гостевая ссылка */
.auth-guest {
  display: block;
  text-align: center;
  background: transparent; border: none;
  color: rgba(200, 160, 240, 0.55);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px; font-style: italic;
  cursor: pointer;
  margin-top: 6px;
  width: 100%;
  transition: color 0.2s ease;
}
.auth-guest:hover { color: var(--auth-pink); }
.auth-guest u { text-decoration-color: rgba(200, 140, 255, 0.5); }

/* === Статус сервера ("check-in") — неоновая пилюля === */
.server-status {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  padding: 5px 14px;
  border: 1px solid rgba(200, 140, 255, 0.4);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(40,24,60,0.7), rgba(18,10,28,0.7));
  color: rgba(220, 180, 255, 0.7);
  box-shadow: 0 0 14px rgba(160, 100, 230, 0.18);
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
}
.server-status::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  background: rgba(220, 180, 255, 0.6);
  box-shadow: 0 0 6px currentColor;
}
.server-status.online  { color: #5ad06f; border-color: rgba(90,205,111,0.5); }
.server-status.online::before  { background: #5ad06f; box-shadow: 0 0 8px #5ad06f; }
.server-status.offline { color: #ff8060; border-color: rgba(255,128,96,0.5); }
.server-status.offline::before { background: #ff8060; box-shadow: 0 0 8px #ff8060; }
