*{margin:0;padding:0;box-sizing:border-box;}

body{
  background:#030712;
  color:#f1f5f9;
  font-family:'Inter', sans-serif;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:hidden;
  padding:20px;
}

/* Glow de fundo */
body::before{
  content:'';
  position:absolute;
  top:-180px;
  left:50%;
  transform:translateX(-50%);
  width:600px;
  height:600px;
  background:radial-gradient(circle, rgba(14,165,233,.10) 0%, transparent 70%);
  pointer-events:none;
  z-index:0;
}

body::after{
  content:'';
  position:absolute;
  bottom:-200px;
  right:-100px;
  width:400px;
  height:400px;
  background:radial-gradient(circle, rgba(14,165,233,.06) 0%, transparent 70%);
  pointer-events:none;
  z-index:0;
}

/* ===== REDIRECT SCREEN ===== */
.redirect-screen{
  position:fixed;
  inset:0;
  background:#030712;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  opacity:0;
  visibility:hidden;
  transition:opacity .4s ease, visibility .4s ease;
}
.redirect-screen.active{
  opacity:1;
  visibility:visible;
}

.redirect-content{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  animation:fadeInUp .5s ease .2s both;
}

.redirect-logo{
  width:64px;
  height:64px;
  border-radius:18px;
  background:linear-gradient(135deg,#0ea5e9,#0284c7);
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  box-shadow:0 0 50px rgba(14,165,233,.3);
  margin-bottom:4px;
}

.redirect-spinner{
  width:32px;
  height:32px;
  border:3px solid rgba(14,165,233,.15);
  border-top-color:#0ea5e9;
  border-radius:50%;
  animation:spin .8s linear infinite;
}

.redirect-content h2{
  font-size:20px;
  font-weight:700;
  color:#f8fafc;
}

.redirect-content p{
  font-size:14px;
  color:#64748b;
}

.redirect-progress{
  width:200px;
  height:3px;
  background:rgba(14,165,233,.1);
  border-radius:4px;
  overflow:hidden;
  margin-top:8px;
}

.redirect-progress-bar{
  height:100%;
  width:0;
  background:linear-gradient(90deg,#0ea5e9,#38bdf8);
  border-radius:4px;
  animation:progressFill 1.8s ease forwards;
}

@keyframes progressFill{
  0%{width:0;}
  60%{width:70%;}
  100%{width:100%;}
}

@keyframes fadeInUp{
  from{opacity:0;transform:translateY(20px);}
  to{opacity:1;transform:translateY(0);}
}

/* ===== BACK LINK ===== */
.back-link{
  position:absolute;
  top:28px;
  left:28px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#94a3b8;
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  transition:all .2s;
  z-index:10;
  padding:8px 14px;
  border-radius:10px;
  border:1px solid transparent;
}
.back-link:hover{
  color:#0ea5e9;
  background:rgba(14,165,233,.05);
  border-color:rgba(14,165,233,.12);
}
.back-link svg{transition:transform .2s;}
.back-link:hover svg{transform:translateX(-3px);}

/* ===== LOGO ===== */
.logo-area{
  margin-bottom:32px;
  text-align:center;
  z-index:1;
}

.logo-icon{
  width:60px;
  height:60px;
  background:linear-gradient(135deg,#0ea5e9,#0284c7);
  border-radius:18px;
  margin:0 auto 16px;
  box-shadow:0 0 40px rgba(14,165,233,.25), 0 4px 20px rgba(0,0,0,.3);
  display:flex;
  align-items:center;
  justify-content:center;
  animation:float 3s ease-in-out infinite;
}

@keyframes float{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-6px);}
}

.logo-area h1{
  font-size:22px;
  font-weight:700;
  color:#f8fafc;
  letter-spacing:-.3px;
}

.logo-area p{
  color:#64748b;
  font-size:14px;
  margin-top:6px;
}

/* ===== CARD ===== */
.card{
  background:rgba(12,20,39,.7);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid rgba(14,165,233,.10);
  border-radius:24px;
  padding:44px 40px;
  width:100%;
  max-width:440px;
  text-align:center;
  z-index:1;
  box-shadow:0 25px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.02);
  position:relative;
}

.card-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(14,165,233,.08);
  border:1px solid rgba(14,165,233,.15);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 20px;
  color:#0ea5e9;
}

.card h2{
  font-size:20px;
  font-weight:700;
  margin-bottom:8px;
  letter-spacing:-.2px;
}

.subtitle{
  color:#64748b;
  font-size:14px;
  margin-bottom:32px;
  line-height:1.5;
}

.divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:28px;
}
.divider span{
  font-size:11px;
  color:#475569;
  text-transform:uppercase;
  font-weight:600;
  letter-spacing:.5px;
  white-space:nowrap;
}
.divider::before,.divider::after{
  content:'';
  flex:1;
  height:1px;
  background:rgba(14,165,233,.10);
}

/* ===== BOTAO MICROSOFT ===== */
.btn-microsoft{
  width:100%;
  padding:16px 24px;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg,#0ea5e9,#0284c7);
  color:white;
  font-weight:600;
  cursor:pointer;
  font-size:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  transition:all .25s ease;
  box-shadow:0 4px 20px rgba(14,165,233,.3);
  position:relative;
  font-family:'Inter', sans-serif;
}

.btn-microsoft:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 30px rgba(14,165,233,.4);
}

.btn-microsoft:active{
  transform:translateY(0);
}

.btn-microsoft.loading{
  pointer-events:none;
  opacity:.85;
}

.btn-icon{
  flex-shrink:0;
}

.btn-loader{
  display:none;
}

.btn-microsoft.loading .btn-text,
.btn-microsoft.loading .btn-icon{
  display:none;
}

.btn-microsoft.loading .btn-loader{
  display:flex;
  align-items:center;
  gap:10px;
}

.spinner{
  width:18px;height:18px;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:white;
  border-radius:50%;
  animation:spin .6s linear infinite;
}

@keyframes spin{
  to{transform:rotate(360deg);}
}

/* ===== SECURITY NOTE ===== */
.security-note{
  margin-top:24px;
  color:#475569;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.security-note svg{
  color:#0ea5e9;
  opacity:.6;
  flex-shrink:0;
}

/* ===== FOOTER ===== */
.footer{
  margin-top:40px;
  text-align:center;
  z-index:1;
}

.footer p{
  color:#334155;
  font-size:13px;
}

.footer a{
  color:#0ea5e9;
  text-decoration:none;
  transition:color .2s;
}
.footer a:hover{
  color:#38bdf8;
}

/* ===== ERROR TOAST ===== */
.error-toast{
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%) translateY(120%);
  background:rgba(12,20,39,.95);
  backdrop-filter:blur(12px);
  border:1px solid rgba(239,68,68,.25);
  border-radius:14px;
  padding:14px 24px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#f1f5f9;
  box-shadow:0 10px 40px rgba(0,0,0,.5);
  transition:transform .35s cubic-bezier(.4,0,.2,1);
  z-index:200;
  white-space:nowrap;
}
.error-toast.show{
  transform:translateX(-50%) translateY(0);
}
.error-toast svg{
  color:#ef4444;
  flex-shrink:0;
}

/* ===== RESPONSIVE ===== */
@media(max-width:480px){
  body{padding:16px;}
  .card{padding:32px 24px;border-radius:20px;}
  .logo-area h1{font-size:19px;}
  .logo-icon{width:52px;height:52px;border-radius:14px;}
  .logo-icon svg{width:24px;height:24px;}
  .card-icon{width:42px;height:42px;}
  .card h2{font-size:18px;}
  .btn-microsoft{padding:14px 20px;font-size:14px;border-radius:12px;}
  .back-link{top:16px;left:16px;font-size:13px;}
  .footer{margin-top:28px;}
  .footer p{font-size:12px;}
}

@media(max-height:680px){
  .logo-area{margin-bottom:20px;}
  .card{padding:32px 28px;}
  .footer{margin-top:24px;}
}

/* Landscape celular */
@media(max-height:500px) and (orientation:landscape){
  body{
    flex-direction:row;
    gap:32px;
    justify-content:center;
    padding:16px 32px;
  }
  .logo-area{margin-bottom:0;flex-shrink:0;}
  .logo-icon{width:48px;height:48px;margin-bottom:10px;}
  .logo-icon svg{width:22px;height:22px;}
  .logo-area h1{font-size:17px;}
  .logo-area p{font-size:12px;}
  .card{padding:24px;max-width:380px;}
  .card-icon{display:none;}
  .card h2{font-size:17px;}
  .subtitle{margin-bottom:20px;font-size:13px;}
  .divider{margin-bottom:18px;}
  .footer{
    position:absolute;
    bottom:8px;
    left:50%;
    transform:translateX(-50%);
    margin:0;
  }
  .footer p{font-size:11px;}
  .back-link{top:12px;left:12px;}
}
