/* ==========================================================================
   Legendario Studio — Auth Gate (Web3 Elegance + Apple Smoothness)
   ========================================================================== */

/* Garante que [hidden] NUNCA seja sobrescrito por display:flex/block */
#authGate [hidden],
#legendarioAuthGate [hidden],
.auth-card [hidden],
.auth-gate__card [hidden],
[id*="auth"] [hidden] {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07090D !important;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

.auth-gate.is-authenticated {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.auth-card,
.auth-gate__card {
  position: relative;
  width: min(400px, 92vw) !important;
  padding: 32px 28px !important;
  border-radius: 20px !important;
  background: rgba(13, 17, 25, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65) !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  text-align: center;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

/* Botões-link discretos (elimina caixa branca padrão do navegador) */
.auth-link-btn,
button.auth-link-btn,
#forgotPasswordBtn,
#backToLoginBtn,
#authForgotPasswordBtn,
#auth2faBackBtn {
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #8B97AD !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color 150ms ease !important;
}

.auth-link-btn:hover,
#forgotPasswordBtn:hover,
#backToLoginBtn:hover,
#authForgotPasswordBtn:hover,
#auth2faBackBtn:hover {
  color: #F1F5F9 !important;
}

/* Checkbox "Permanecer conectado" discreto e alinhado */
.auth-remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #94A3B8;
  cursor: pointer;
  user-select: none;
}

.auth-remember-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #FF5E1A;
  cursor: pointer;
}

/* Botão primário laranja limpo (sem emoji, altura consistente) */
.auth-btn-primary,
.auth-gate__btn-submit {
  width: 100% !important;
  height: 42px !important;
  border-radius: 10px !important;
  border: 0 !important;
  background: linear-gradient(135deg, #FF7A2F, #FF5E1A) !important;
  color: #FFFFFF !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: filter 160ms ease, transform 140ms ease !important;
}
.auth-btn-primary:hover,
.auth-gate__btn-submit:hover { filter: brightness(1.06); }
.auth-btn-primary:active,
.auth-gate__btn-submit:active { transform: scale(0.985); }

.auth-gate__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF7A1A, #FF3E00, transparent);
  filter: blur(0.5px);
}

.auth-gate__logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 8px 24px rgba(255, 94, 26, 0.45));
}

.auth-gate__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.auth-gate__subtitle {
  margin: 0 0 24px;
  font-size: 13px;
  color: #9AA0A6;
  line-height: 1.45;
}

.auth-gate__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.auth-gate__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-gate__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A0A5B0;
}

.auth-gate__input {
  height: 44px;
  padding: 0 14px;
  background: rgba(8, 10, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 14px;
  color: #FFFFFF;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.auth-gate__input:focus {
  border-color: #FF5E1A;
  box-shadow: 0 0 0 3px rgba(255, 94, 26, 0.2);
  background: rgba(12, 14, 20, 0.9);
}

.auth-gate__btn-submit {
  height: 44px;
  margin-top: 6px;
  background: linear-gradient(135deg, #FF7A1A 0%, #E64A00 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(255, 94, 26, 0.5);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-gate__btn-submit:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -4px rgba(255, 94, 26, 0.65);
}

.auth-gate__btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-gate__btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.auth-gate__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #555A65;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-gate__divider::before,
.auth-gate__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-gate__btn-google {
  height: 42px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #E2E4E8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.auth-gate__btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.auth-gate__btn-checkout {
  margin-top: 18px;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #FFA366;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.auth-gate__btn-checkout:hover {
  color: #FFC299;
}

.auth-gate__error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(235, 50, 50, 0.12);
  border: 1px solid rgba(235, 50, 50, 0.35);
  border-radius: 10px;
  font-size: 12px;
  color: #FF8585;
  display: none;
  text-align: left;
  line-height: 1.4;
  animation: authShake 0.35s ease;
}

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

.auth-gate__error.is-visible {
  display: block;
}

/* 5º Card: Estilos de Skill & Extensão */
.plat-tile--skill {
  grid-column: span 2;
  background: radial-gradient(circle at 90% 10%, rgba(255, 94, 26, 0.12) 0%, rgba(18, 22, 30, 0.85) 60%);
  border: 1px solid rgba(255, 120, 40, 0.25) !important;
  cursor: default !important;
  text-align: left;
}

.skill-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 94, 26, 0.2);
  color: #FF9A3C;
  border: 1px solid rgba(255, 94, 26, 0.35);
}

.skill-badge.has-update {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
  border-color: rgba(34, 197, 94, 0.4);
}

.skill-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mcp-prompt-box {
  background: #080A0F !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 11.5px !important;
  line-height: 1.5 !important;
  color: #CBD5E1 !important;
  word-break: break-all !important;
  max-height: 76px !important;
  overflow-y: auto !important;
  margin-bottom: 12px !important;
  user-select: all !important;
}

.mcp-prompt-box::-webkit-scrollbar {
  width: 4px;
}
.mcp-prompt-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
