/* ==========================================================================
   AUTH.CSS - Login e Cadastro (Transição Suave / Smooth)
   ========================================================================== */

:root {
    /* Cores Base */
    --accent-color: #00D4FF; /* Azul Cadete */
    --bg-deep: #02040A;
    --glass-bg: rgba(13, 19, 36, 0.85);
    
    /* Fontes */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- O SEGREDO DA TRANSIÇÃO --- */
body.captain-mode {
    --accent-color: #FF2A2A; /* Vermelho Capitão */
}

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

body {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; overflow: hidden;
    background: var(--bg-deep);
    font-family: var(--font-body); color: white;
    padding: 20px;
    transition: background 1s ease-in-out; 
}

/* 2. COMPONENTES COM TRANSIÇÃO LENTA */
.btn-action, 
.input-group input, 
.input-group label, 
.role-card,
.text-highlight,
.back-btn,
.scanner-line {
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3. CONTAINER PRINCIPAL */
.login-container {
    width: 950px; max-width: 90%; position: relative; z-index: 10;
    margin-top: 40px;
}

.glass-panel {
    display: flex; background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: box-shadow 0.8s ease;
}

/* Visual Side */
.visual-side {
    flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
    background: url('https://i.pinimg.com/originals/2d/2f/7f/2d2f7f73d63063765e977799b6623637.gif') center/cover no-repeat;
}
.visual-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(2,4,10,0.4), var(--bg-deep));
}
.logo-display { position: relative; z-index: 2; text-align: center; }
.logo-text { font-family: var(--font-heading); font-size: 3rem; margin: 0; }
.text-highlight { 
    color: var(--accent-color); 
    text-shadow: 0 0 20px var(--accent-color);
}
.subtitle { color: #ccc; letter-spacing: 3px; font-size: 0.8rem; margin-top: 10px; opacity: 0.8; }

/* Form Side */
.form-side {
    flex: 1.1; padding: 40px; display: flex; flex-direction: column;
    justify-content: center; background: rgba(0,0,0,0.2);
}

/* Inputs */
.input-group { margin-bottom: 15px; }
.input-group label {
    display: block; font-size: 0.75rem; color: var(--accent-color);
    margin-bottom: 6px; font-family: var(--font-heading); letter-spacing: 1px; font-weight: bold;
}
.input-group input {
    width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.4);
    border: 1px solid #333; color: white; border-radius: 8px; outline: none;
    font-family: var(--font-body); font-size: 0.9rem;
}
.input-group input:focus {
    border-color: var(--accent-color); 
    box-shadow: 0 0 15px var(--accent-color);
    background: rgba(0,0,0,0.6);
}

/* SELETOR DE PATENTE (Onde você clica) */
.role-selector { display: flex; gap: 15px; margin-bottom: 10px; }
.role-card {
    flex: 1; padding: 15px; border: 1px solid #444; background: rgba(255,255,255,0.03);
    text-align: center; border-radius: 10px; cursor: pointer; 
    opacity: 0.6; transform: scale(0.98);
}
.role-card:hover { opacity: 0.9; background: rgba(255,255,255,0.08); }

.role-card.active {
    border-color: var(--accent-color); 
    background: rgba(255, 255, 255, 0.05);
    opacity: 1; transform: scale(1);
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 10px var(--accent-color);
}
.role-card h4 { margin: 5px 0 0 0; font-family: var(--font-heading); color: var(--accent-color); font-size: 0.85rem; }
.role-card .icon { font-size: 1.5rem; filter: grayscale(100%); transition: 0.3s; }
.role-card.active .icon { filter: grayscale(0%); transform: scale(1.2); }

/* ==========================================================================
   TERMOS DE USO E ÁREA DE SUBMISSÃO (NOVO ESPAÇAMENTO E ESTILO)
   ========================================================================== */
.terms-wrapper {
    display: flex; align-items: flex-start; gap: 12px; 
    margin-top: 25px; margin-bottom: 25px;
    padding: 15px; background: rgba(255,255,255,0.02);
    border-radius: 8px; border-left: 2px solid var(--accent-color);
    transition: 0.3s;
}
.terms-wrapper input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 2px; cursor: pointer;
    accent-color: var(--accent-color);
}
.terms-text { font-size: 0.85rem; color: #aaa; line-height: 1.5; transition: 0.3s;}
.link-termos {
    color: var(--accent-color); text-decoration: none; font-weight: 700;
    transition: 0.3s; padding-bottom: 2px;
}
.link-termos:hover {
    color: #fff; text-shadow: 0 0 10px var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

/* Área inferior com Gap generoso para separar os botões */
.submit-area {
    display: flex; flex-direction: column; gap: 30px; 
    margin-top: 10px;
}

/* Botões */
.btn-action {
    width: 100%; padding: 18px;
    background: var(--accent-color); border: none; border-radius: 8px;
    color: #000; font-family: var(--font-heading); font-weight: 800;
    cursor: pointer; text-transform: uppercase; letter-spacing: 2px;
    box-shadow: 0 0 15px var(--accent-color); transition: 0.3s;
}
.captain-mode .btn-action { color: white; }
.btn-action:hover { 
    background: white; 
    color: black;
    box-shadow: 0 0 35px var(--accent-color); 
    transform: translateY(-2px); 
}

/* Back Btn */
.back-btn {
    position: fixed; top: 20px; left: 20px; z-index: 9999;
    color: var(--accent-color); font-size: 0.75rem; text-decoration: none;
    font-family: var(--font-heading); font-weight: bold; letter-spacing: 1px;
    padding: 8px 18px; border: 1px solid var(--accent-color); border-radius: 30px;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.back-btn:hover {
    background: var(--accent-color); color: #000;
    box-shadow: 0 0 20px var(--accent-color); padding-left: 12px; padding-right: 24px;
}

/* Fundo Estrelado */
#stars-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}
.star { position: absolute; background: white; border-radius: 50%; }

/* Mobile */
@media (max-width: 900px) {
    .login-container { width: 100%; height: 100vh; max-width: 100%; border-radius: 0; margin-top: 0; }
    .glass-panel { flex-direction: column; height: 100%; border-radius: 0; border: none; overflow-y: auto; }
    .visual-side { flex: 0.3; min-height: 200px; align-items: flex-end; padding-bottom: 20px; }
    .logo-display { padding-top: 60px; }
    .form-side { flex: 1; padding: 30px; background: var(--bg-deep); justify-content: flex-start; padding-top: 40px; }
    .back-btn { top: 20px; left: 20px; padding: 8px 15px; font-size: 0.7rem; }
}

/* Link Highlight */
.link-highlight {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: 0.3s;
}
.link-highlight::after {
    content: '';
    position: absolute; width: 0%; height: 2px; bottom: -2px; left: 0;
    background-color: var(--accent-color); transition: width 0.3s;
}
.link-highlight:hover::after { width: 100%; }
.link-highlight:hover { text-shadow: 0 0 10px var(--accent-color); }

.shake-error {
    animation: shake-terms 0.4s ease-in-out;
    color: #ff4b4b !important;
}

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

/* Feedback de Erro */
.messages-container {
    margin-bottom: 15px; padding: 10px; background: rgba(255, 75, 75, 0.2);
    border: 1px solid #ff4b4b; border-radius: 8px;
}
.error-msg {
    color: #ffcccc; font-size: 0.8rem; margin: 0; text-align: center;
}

/* ==========================================================================
   MODAL DOS TERMOS DE USO (NOVO ESTILO LIMPO)
   ========================================================================== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 99999; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}

.modal-box {
    max-width: 600px; width: 90%; max-height: 80vh; 
    display: flex; flex-direction: column; 
    background: rgba(10, 14, 23, 0.95); /* Fundo sutilmente mais claro que o body */
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 20px rgba(0, 212, 255, 0.05);
    overflow: hidden; /* Garante que nada vaza dos cantos arredondados */
}

/* Cabeçalho do Modal */
.modal-header {
    padding: 25px 30px 15px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.modal-title {
    color: var(--accent-color); font-family: var(--font-heading);
    font-size: 1.6rem; margin-bottom: 5px; text-transform: uppercase;
    letter-spacing: 2px;
}
.modal-subtitle { color: #7a8294; font-size: 0.85rem; letter-spacing: 1px; margin: 0; }

/* Área de Rolagem do Texto */
.terms-scroll {
    flex: 1; overflow-y: auto; 
    padding: 25px 30px;
    background: rgba(0,0,0,0.2); /* Fundo mais escuro para a área de leitura */
}
.terms-scroll::-webkit-scrollbar { width: 8px; }
.terms-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.terms-scroll::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 4px; }

/* Cada Ponto dos Termos */
.terms-point { 
    margin-bottom: 20px; 
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255,255,255,0.05); /* Linha separadora sutil */
}
.terms-point:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.terms-point strong { 
    color: #fff; 
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; font-size: 1rem; 
    font-family: var(--font-heading);
    letter-spacing: 1px;
}
.terms-point strong::before {
    content: '■'; /* Detalhe visual militar */
    color: var(--accent-color);
    font-size: 0.8rem;
}
.terms-point p {
    color: #a0a8b8; font-size: 0.9rem; line-height: 1.6;
    padding-left: 15px; /* Recua o texto levemente em relação ao título */
    margin: 0;
}

/* Rodapé / Botão do Modal */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(10, 14, 23, 0.95);
}
.modal-footer .btn-action {
    margin-top: 0;
}

/* ==========================================================================
   ANIMAÇÃO DE CARREGAMENTO (LOGIN LOADER)
   ========================================================================== */
.login-loader-overlay {
    display: none; /* Controlado via JS */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 4, 10, 0.95); /* Ligeiramente mais transparente */
    backdrop-filter: blur(20px); /* Efeito HUD de vidro militar */
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    flex-direction: column; justify-content: center; align-items: center;
    transition: all 0.5s ease;
}

.loader-content-box { 
    text-align: center; 
    position: relative; 
    padding: 50px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    animation: pulse-glow 2.5s infinite alternate ease-in-out;
}

.big-logo { font-size: 4rem; opacity: 0; transform: scale(0.9); }

.scanner-line { 
    width: 100%; /* Expande o laser para a largura total da caixa */
    height: 2px; 
    background: var(--accent-color); 
    margin: 0 auto 20px auto; 
    box-shadow: 0 0 10px var(--accent-color); 
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

/* O feixe de luz que corre por dentro da linha */
.scanner-line::after {
    content: ''; position: absolute; top: 0; left: -50%;
    width: 40%; height: 100%;
    background: #ffffff;
    box-shadow: 0 0 30px #ffffff, 0 0 40px #ffffff;
    animation: scan-laser 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scan-laser { 
    0% { left: -50%; } 
    100% { left: 100%; } 
}
@keyframes pulse-glow { 
    0% { transform: scale(0.98); opacity: 0.9; } 
    100% { transform: scale(1.02); opacity: 1; } 
}

/* Animação de Materialização (Padrão/Cadete) */
.materialize-anim {
    animation: materialize 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes materialize {
    0% { opacity: 0; letter-spacing: 20px; filter: blur(10px); transform: scale(0.8); }
    50% { opacity: 0.5; letter-spacing: 5px; filter: blur(5px); }
    100% { opacity: 1; letter-spacing: 0; filter: blur(0); transform: scale(1); }
}

/* 3. MODO CAPITÃO (Glitch Vermelho) */
.captain-takeover .text-highlight { color: #FF2A2A !important; text-shadow: 0 0 30px #FF2A2A; }
.captain-takeover .scanner-line { background: #FF2A2A !important; box-shadow: 0 0 20px #FF2A2A; }
.captain-takeover .big-logo { animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite; color: white; }

@keyframes glitch-skew {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Efeito de corte no texto (Clip Path) para o Glitch */
.captain-takeover .big-logo::before,
.captain-takeover .big-logo::after {
    content: "TECNOLANDS";
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 4, 10, 0.98);
}
.captain-takeover .big-logo::before {
    left: 2px; text-shadow: -1px 0 #ff00c1; 
    clip-path: inset(44% 0 61% 0); 
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.captain-takeover .big-logo::after {
    left: -2px; text-shadow: -1px 0 #00fff9; 
    clip-path: inset(50% 0 30% 0); 
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); } 100% { clip-path: inset(80% 0 20% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); } 100% { clip-path: inset(30% 0 10% 0); } }

/* ==========================================================================
   TELA DE CORTE MARCIAL (LOCKDOWN)
   ========================================================================== */
.military-lockdown {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #050000;
    background-image: radial-gradient(circle, #200000 0%, #000000 90%);
    z-index: 999999; /* Z-Index Aumentado para vencer o loader */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ff0000;
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
}

.lockdown-container {
    border: 4px solid #ff0000;
    padding: 50px;
    background: rgba(20, 0, 0, 0.9);
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5), inset 0 0 20px rgba(255, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    animation: borderFlash 2s infinite;
    position: relative;

    /* Ajuste para permitir que partículas voem pra fora */
    overflow: visible !important;
    transition: height 0.5s;
}

.danger-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: shake 0.5s infinite alternate;
}

.denied-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 5px;
    margin: 0;
    text-shadow: 0 0 20px #ff0000;
}

.denied-subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
    opacity: 0.8;
    background: #ff0000;
    color: black;
    display: inline-block;
    padding: 2px 10px;
}

.denied-info {
    text-align: left;
    margin: 20px 0;
    border: 1px solid #500;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.reason-box {
    color: #ffcccc;
    font-size: 1.1rem;
    margin-top: 10px;
    font-style: italic;
    border-left: 3px solid #ff0000;
    padding-left: 15px;
}

.btn-return {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid #ff0000;
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Orbitron';
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-return:hover {
    background: #ff0000;
    color: black;
    box-shadow: 0 0 30px #ff0000;
}

.scanlines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,0,0,0), rgba(255,0,0,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}

@keyframes borderFlash {
    0%, 100% { border-color: #ff0000; box-shadow: 0 0 50px rgba(255, 0, 0, 0.5); }
    50% { border-color: #500000; box-shadow: 0 0 10px rgba(255, 0, 0, 0.2); }
}

@keyframes shake {
    from { transform: translateX(-2px); }
    to { transform: translateX(2px); }
}

/* --- NOVO: GARANTE QUE O LOADER SUMA SE ESTIVER BANIDO --- */
body.banned .login-loader-overlay {
    display: none !important;
}


/* ==========================================================================
   ANIMAÇÃO DE DESINTEGRAÇÃO (BANIMENTO)
   ========================================================================== */

/* Palco da Execução - Centralizado */
.avatar-execution-stage {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px auto; /* Margem ajustada */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Imagem da Vítima */
.victim-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid #ff0000;
    object-fit: cover;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
    transition: opacity 0.1s;
    position: relative;
    z-index: 2;
}

.victim-placeholder {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: #300;
    border: 3px solid #f00;
    display: flex; justify-content: center; align-items: center;
    font-size: 3rem; color: #f00;
    box-shadow: 0 0 25px #f00;
    position: relative;
    z-index: 2;
}

/* 1. Efeito de Tremor (Medo/Erro) */
.shaking {
    animation: violent-shake 0.5s cubic-bezier(.36,.07,.19,.97) both infinite;
    filter: hue-rotate(90deg) contrast(2) sepia(1); 
}

@keyframes violent-shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, 0, 0); }
    40%, 60% { transform: translate3d(8px, 0, 0); }
}

/* 2. Partículas da Explosão */
.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 1;
    z-index: 10;
    pointer-events: none;
    animation: explode-out 1s ease-out forwards;
}

@keyframes explode-out {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

/* 3. Conteúdo escondido inicialmente */
.hidden-content {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* 4. Entrada Dramática do Texto (SLAM) */
.fade-in-slam {
    animation: text-slam 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

@keyframes text-slam {
    0% { opacity: 0; transform: scale(2); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Ajuste no container do lockdown */
.lockdown-container {
    overflow: visible !important; /* IMPORTANTE: Deixa as partículas voarem pra fora */
    transition: height 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Garante que o overlay cubra tudo */
.military-lockdown {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #050000;
    background-image: radial-gradient(circle, #200000 0%, #000000 90%);
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   BOTÃO DE SENHA (TECH STYLE) E LINKS INFERIORES
   ========================================================================== */

.btn-eye {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color); /* Usa a cor do tema (Azul ou Vermelho) */
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(0, 212, 255, 0.3));
}

.btn-eye:hover .eye-icon {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.hidden {
    display: none !important;
}

/* Links Abaixo do Login (Sem interferir no Cadastro) */
.auth-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.text-warn { color: #ffaa00 !important;  }
.text-warn:hover { text-shadow: 0 0 15px #ffaa00; }