/* Reset e estilos globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: #000;
  color: #fff;
}



/* Container principal */
.container {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #111;
  position: relative;
  padding: 20px;
}

body::-webkit-scrollbar {
  display: none;
}

/* Simulação de iPhone */
.device-frame {
  width: 100%;
  max-width: 375px;
  height: 100%;
  max-height: 812px;
  background-color: #000;
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  box-shadow: 
      0 0 0 11px #1f1f1f,
      0 0 0 13px #191919,
      0 0 0 14px #111,
      0 0 30px rgba(255, 255, 255, 0.2),
      0 30px 60px rgba(0,0,0,0.3);
  overflow-y: hidden;
}



/* Notch do iPhone */
.device-frame:before {
  content: '';
  display: block;
  width: 150px;
  height: 30px;
  background: #000;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 100;
}

/* Botão Home/Barra inferior do iPhone */
.device-frame:after {
  content: '';
  display: block;
  width: 140px;
  height: 5px;
  background: #333;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  z-index: 100;
}



/* Conteúdo do app */
.app-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(135deg, #15151e 0%, #1a1a24 100%);
}

/* Background com efeito */
.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #15151e 0%, #1a1a24 100%);
  z-index: -2;
}

/* Partículas de fundo */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.particle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 25s infinite linear;
}

@keyframes float {
  0% {
      transform: translateY(0) translateX(0) rotate(0);
  }
  50% {
      transform: translateY(-100px) translateX(100px) rotate(180deg);
  }
  100% {
      transform: translateY(0) translateX(0) rotate(360deg);
  }
}

/* Wrapper do login */
.login-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  width: 100%;
  padding: 20px;
  position: relative;
}

/* Painel de login */
.login-panel {
  width: 100%;
  max-width: 320px;
  background-color: rgba(25, 25, 35, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

/* Logo */
.logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 15px;
}

.logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(20, 55, 110, 0.5));
}

/* Títulos */
h1 {
  color: gold;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0.9;
}

h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.8;
}

/* Seleção de corretora */
.broker-selection {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.broker-btn {
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #333;
  color: #fff;
  flex: 1;
  max-width: 120px;
}

.broker-btn.active {
  background-color: rgb(20, 55, 110);
  color: white;
  box-shadow: 0 4px 8px rgba(20, 55, 110, 0.3);
}

/* Formulário */
.login-form {
  width: 100%;
}

.input-group {
  margin-bottom: 20px;
  width: 100%;
  text-align: left;
}

.input-group label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  font-size: 15px;
  transition: all 0.2s ease;
  outline: none;
}

.input-group input:focus {
  border-color: rgb(20, 55, 110);
  box-shadow: 0 0 0 2px rgba(20, 55, 110, 0.2);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Container de senha */
.password-container {
  position: relative;
  width: 100%;
}

.show-password-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
}

.show-password-icon {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.5);
  transition: fill 0.2s;
}

.show-password-btn:hover .show-password-icon {
  fill: #ff0066;
}

/* Botão de login */
.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: rgb(20, 55, 110);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(20, 55, 110, 0.3);
}

.login-btn:hover {
  background: rgb(33, 81, 159);
  box-shadow: 0 6px 12px rgba(20, 55, 110, 0.4);
  transform: translateY(-2px);
}

.login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(255, 0, 102, 0.4);
}

/* Link de esqueceu a senha */
.forgot-password {
  margin-top: 15px;
  text-align: center;
}

.forgot-password a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.forgot-password a:hover {
  color: #ff0066;
}

/* Mensagem de erro */
.error-message {
  background-color: rgba(20, 55, 110, 0.2);
  border: 1px solid rgba(20, 55, 110, 0.4);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

/* Efeito loading */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* Versão */
.version {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: center;
  margin-top: 30px;
}

/* Efeito de luz em volta do iPhone */
@keyframes glow {
  0% {
      box-shadow: 
          0 0 0 11px #1f1f1f,
          0 0 0 13px #191919,
          0 0 0 14px #111,
          0 0 30px rgba(255, 255, 255, 0.2),
          0 30px 60px rgba(0,0,0,0.3);
  }
  50% {
      box-shadow: 
          0 0 0 11px #1f1f1f,
          0 0 0 13px #191919,
          0 0 0 14px #111,
          0 0 40px rgba(255, 255, 255, 0.3),
          0 30px 70px rgba(0,0,0,0.4);
  }
  100% {
      box-shadow: 
          0 0 0 11px #1f1f1f,
          0 0 0 13px #191919,
          0 0 0 14px #111,
          0 0 30px rgba(255, 255, 255, 0.2),
          0 30px 60px rgba(0,0,0,0.3);
  }
}

.device-frame {
  animation: glow 4s infinite ease-in-out;
}

/* Media queries para responsividade */
@media (max-width: 768px) {
  .app-content {
  margin: 0;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(135deg, #15151e 0%, #1a1a24 100%);
}
  .container {
      padding: 0;

  }
  
  .device-frame {
    width: 100%;
      border-radius: 0;
      max-height: 100%;
      box-shadow: none;
      animation: none;
      max-width: 100%;
      margin: 0px;
      border: 0px;
  }
  
  .device-frame:before,
  .device-frame:after {
      display: none;
  }
  
  .login-panel {
      max-width: 100%;
      padding: 20px;
      border-radius: 0;
  }
}







/* Estilos específicos para modo escuro */
@media (prefers-color-scheme: dark) {
  .login-panel {
      background-color: rgba(20, 20, 28, 0.85);
  }
}
/* Tela de carregamento sobreposta ao login */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 28, 0.95);
    backdrop-filter: blur(5px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 280px;
}

.loading-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
    animation: pulse 2s infinite ease-in-out;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(20, 55, 110, 0.5));
}

@keyframes pulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}

.loading-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(20, 55, 110, 0.4);
}

.loading-status {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    text-align: center;
}

.progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgb(20, 55, 110), rgb(33, 81, 159));
    border-radius: 5px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 30px;
}

.connection-steps {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.connection-step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.connection-step.active {
    opacity: 1;
}

.connection-step.completed {
    opacity: 0.8;
}

.step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.step-circle.active {
    background: rgb(20, 55, 110);
    box-shadow: 0 0 10px rgba(20, 55, 110, 0.5);
}

.step-circle.completed {
    background: rgb(33, 81, 159);
}

.step-circle i {
    color: white;
    font-size: 12px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.step-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* Loading spinner no centro */
.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #ff0066;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}