:root {
    --bg-main: #07090e; 
    --bg-card: rgba(15, 22, 36, 0.7); 
    --bg-input: #0b0f19; 
    --neon-purple: #7c3aed; 
    --neon-green: #02c383; 
    --text-main: #f3f4f6;
    --text-muted: #6b7280;
    --radius: 8px;
    
    --brand-google: #ffffff;
    --brand-twitch: #9146ff;
    --brand-discord: #5865f2;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 16px; background: radial-gradient(circle at 50% 30%, #151d30 0%, #07090e 75%); }

.auth-container { width: 100%; max-width: 380px; background: var(--bg-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.04); border-radius: var(--radius); padding: 24px 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.logo-dot { width: 8px; height: 8px; background: var(--neon-green); border-radius: 50%; box-shadow: 0 0 10px var(--neon-green); }
.logo-text { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; background: linear-gradient(90deg, #ffffff, #9ca3af); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-subtitle { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; margin-bottom: 5px; }
.input-wrapper { 
    position: relative; 
    display: flex; 
    align-items: center; 
    background: var(--bg-input); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: var(--radius); 
    padding: 0 12px; 
    transition: all 0.2s ease; 
    overflow: hidden; /* Evita que el fondo del autocompletado rompa las esquinas redondeadas */
}



.input-wrapper:focus-within { 
    border-color: var(--neon-purple); 
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.2); 
    background: #0a0e1a; /* Un tono sutilmente más claro al enfocar para dar feedback */
}

.input-icon { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-muted); 
    margin-right: 10px; 
    flex-shrink: 0; 
}

.input-wrapper input { 
    width: 100%; 
    background: transparent !important; 
    border: none; 
    outline: none; 
    color: #ffffff; 
    font-size: 13px; 
    font-weight: 500; 
    padding: 10px 0; 
    box-shadow: none !important;
}

/* MICRO-PARCHE: Destruye el fondo blanco/gris de autocompletado en Chrome, Edge y Safari */
.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover, 
.input-wrapper input:-webkit-autofill:focus, 
.input-wrapper input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 0 50px var(--bg-input) !important; 
}

/* Cambia dinámicamente la sombra interna si el campo autocompletado gana el foco */
.input-wrapper:focus-within input:-webkit-autofill {
    box-shadow: inset 0 0 0 50px #0a0e1a !important;
}

.input-wrapper input::placeholder { 
    color: #4b5563; /* Gris de alta densidad optimizado para lectura en pantallas oscuras */
}

.btn-toggle-password { background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; margin-left: 6px; }
.btn-toggle-password:hover { color: var(--text-main); }

.form-options { display: flex; align-items: center; margin-bottom: 20px; padding-top: 2px; }
.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; color: var(--text-muted); font-weight: 600; user-select: none; }
.remember-me input { display: none; }
.custom-checkbox { width: 14px; height: 14px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px; background: var(--bg-input); display: inline-block; position: relative; }
.remember-me input:checked + .custom-checkbox { background: var(--neon-purple); border-color: var(--neon-purple); }
.remember-me input:checked + .custom-checkbox::after { content: ''; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.btn-submit { width: 100%; background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 100%); border: none; border-radius: var(--radius); color: #ffffff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25); margin-bottom: 20px; }
.btn-submit:hover { filter: brightness(1.1); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4); transform: translateY(-1px); }

.form-toggle-container { text-align: right; font-size: 11px; color: var(--text-muted); margin-bottom: 24px; }
.form-toggle-container a { color: var(--neon-purple); text-decoration: none; font-weight: bold; }
.form-toggle-container a:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; text-align: center; margin-bottom: 20px; color: rgba(255, 255, 255, 0.05); }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.divider:not(:empty)::before { margin-right: .5em; }
.divider:not(:empty)::after { margin-left: .5em; }
.divider span { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; }

.social-auth-group { display: flex; flex-direction: column; gap: 8px; }
.btn-social { width: 100%; border: 1px solid rgba(255, 255, 255, 0.03); border-radius: var(--radius); padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer; transition: all 0.2s ease; }
.btn-social.google { background: #ffffff; color: #0c1017; }
.btn-social.google:hover { background: #f1f1f1; box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1); }
.btn-social.twitch { background: var(--brand-twitch); color: #ffffff; }
.btn-social.twitch:hover { filter: brightness(1.1); box-shadow: 0 4px 15px rgba(145, 70, 255, 0.25); }
.btn-social.discord { background: var(--brand-discord); color: #ffffff; }
.btn-social.discord:hover { filter: brightness(1.1); box-shadow: 0 4px 15px rgba(88, 101, 246, 0.25); }

.alert { padding: 8px 12px; border-radius: var(--radius); font-size: 11px; margin-bottom: 15px; border: 1px solid; word-wrap: break-word; font-weight: 600; }
.alert-error { background: rgba(248, 81, 73, 0.1); color: #f85149; border-color: rgba(248, 81, 73, 0.2); }

.grecaptcha-badge { visibility: hidden; }
.captcha-tos { font-size: 9px; color: var(--text-muted); text-align: center; margin-top: 15px; line-height: 1.3; }
.captcha-tos a { color: #8b949e; text-decoration: none; }
