/* ============================================================
   auth.css — ekran logowania / rejestracji / weryfikacji.
   Pasuje do średniowiecznej palety gry (--p, --w, --g z main.css).
   ============================================================ */

.auth-body {
  background:
    radial-gradient(ellipse at top, #2a3a18 0%, #0e1808 60%, #050a02 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
}

.auth-shell {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-header {
  text-align: center;
  color: var(--gl);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.auth-title {
  font-family: 'Almendra', serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
}

.auth-sub {
  font-family: 'Philosopher', serif;
  font-size: 14px;
  color: rgba(244, 232, 208, 0.75);
  margin-top: 4px;
}

/* ---------- zakładki ---------- */

.auth-tabs {
  display: flex;
  border: 2px solid var(--g);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  color: rgba(244, 232, 208, 0.7);
  font-family: 'Almendra', serif;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab:hover {
  background: rgba(184, 134, 11, 0.18);
  color: var(--p);
}

.auth-tab.active {
  background: linear-gradient(180deg, #b8860b, #8a6308);
  color: #1a1208;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-tab[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---------- karta z formami ---------- */

.auth-card {
  background: linear-gradient(180deg, #f4e8d0 0%, #e8d9b8 100%);
  border: 3px solid var(--w);
  border-radius: 8px;
  padding: 22px 24px 18px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  color: var(--ink);
}

.auth-form { display: none; flex-direction: column; gap: 12px; }
.auth-form.active { display: flex; }

.auth-h2 {
  font-family: 'Almendra', serif;
  font-size: 22px;
  color: var(--wd);
  margin: 0 0 4px;
  text-align: center;
}

.auth-text {
  font-family: 'Philosopher', serif;
  font-size: 14px;
  color: var(--il);
  margin: 0;
  text-align: center;
  line-height: 1.45;
}

/* ---------- pola ---------- */

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-label {
  font-family: 'Almendra', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--wd);
  letter-spacing: 0.5px;
}

.auth-input {
  font-family: 'Philosopher', serif;
  font-size: 15px;
  color: var(--ink);
  background: #fff8e7;
  border: 2px solid var(--w);
  border-radius: 4px;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.25);
}

.auth-input:invalid:not(:placeholder-shown) {
  border-color: #a83a2a;
}

.auth-hint {
  font-family: 'Philosopher', serif;
  font-size: 12px;
  color: var(--il);
  opacity: 0.85;
}

/* ---------- przyciski ---------- */

.auth-btn {
  font-family: 'Almendra', serif;
  font-size: 16px;
  padding: 11px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.05s, filter 0.15s;
  border: 2px solid transparent;
}

.auth-btn:active { transform: translateY(1px); }
.auth-btn[disabled] { cursor: not-allowed; opacity: 0.6; }

.auth-btn-primary {
  background: linear-gradient(180deg, #b8860b, #8a6308);
  color: #fdf6e3;
  border-color: var(--wd);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.auth-btn-primary:hover:not([disabled]) { filter: brightness(1.1); }

.auth-link {
  background: transparent;
  border: 0;
  padding: 0;
  font-family: 'Philosopher', serif;
  color: var(--w);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-link:hover { color: var(--g); }

/* ---------- kod 6-cyfrowy ---------- */

.auth-code {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 6px 0;
}

.auth-code-cell {
  width: 44px;
  height: 54px;
  font-family: 'Almendra', serif;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: #fff8e7;
  border: 2px solid var(--w);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-code-cell:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.3);
}

.auth-code-cell.filled {
  background: #fdf6e3;
}

.auth-code.shake {
  animation: shake 0.35s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* ---------- komunikaty ---------- */

.auth-msg {
  font-family: 'Philosopher', serif;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
  border-radius: 4px;
  padding: 6px 8px;
  margin-top: 2px;
}

.auth-msg.empty { display: none; }
.auth-msg.error { background: rgba(179, 58, 42, 0.15); color: #8a2818; border: 1px solid #b33a2a; }
.auth-msg.ok    { background: rgba(74, 107, 58, 0.18); color: #2d4a1f; border: 1px solid #4a6b3a; }
.auth-msg.info  { background: rgba(184, 134, 11, 0.15); color: var(--wd); border: 1px solid var(--g); }

/* ---------- stopka i drobiazgi ---------- */

.auth-foot {
  font-family: 'Philosopher', serif;
  font-size: 13px;
  color: var(--il);
  text-align: center;
  margin: 4px 0 0;
}

.auth-cooldown {
  font-family: 'Philosopher', serif;
  font-size: 12px;
  color: var(--il);
  opacity: 0.75;
  margin-left: 4px;
}

.auth-footer {
  text-align: center;
  font-family: 'Philosopher', serif;
  font-size: 12px;
  color: rgba(244, 232, 208, 0.5);
  margin-top: 4px;
}
